Part Number Hot Search : 
LQW15 SML60H20 2SB337 201VSN5 BUV21 ND2410B HCTS32D BUV21
Product Description
Full Text Search
 

To Download TB8238 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
    
    
 
 
    

  the information in this publication has been carefully checked and is believed to be entirely accurate at the time of publication. samsung assumes no responsibility, however, for possible errors or omissions, or for any consequences resulting from the use of the information contained herein. samsung reserves the right to make changes in its products or product specifications with the intent to improve function or design at any time and without notice and is not required to update this documentation to reflect such changes. this publication does not convey to a purchaser of semiconductor devices described herein any license under the patent rights of samsung or others. samsung makes no warranty, representation, or guarantee regarding the suitability of its products for any particular purpose, nor does samsung assume any liability arising out of the application or use of any product or circuit and specifically disclaims any and all liability, including without limitation any consequential or incidental damages. "typical" parameters can and do vary in different applications. all operating parameters, including "typicals" must be validated for each customer application by the customer's technical experts. samsung products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, for other applications intended to support or sustain life, or for any other application in which the failure of the samsung product could create a situation where personal injury or death may occur. should the buyer purchase or use a samsung product for any such unintended or unauthorized application, the buyer shall indemnify and hold samsung and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, expenses, and reasonable attorney fees arising out of, either directly or indirectly, any claim of personal injury or death that may be associated with such unintended or unauthorized use, even if such claim alleges that samsung was negligent regarding the design or manufacture of said product.  
              !" # 


$$$ ? 2001 samsung electronics all rights reserved. no part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electric or mechanical, by photocopying, recording, or otherwise, without the prior written consent of samsung electronics. samsung electronics' microcontroller business has been awarded full iso-14001 certification (bsi certificate no. fm24653). all semiconductor products are designed and manufactured in accordance with the highest quality standards and objectives. samsung electronics co., ltd. san #24 nongseo-ri, kiheung- eup yongin-city, kyunggi-do, korea c.p.o. box #37, suwon 449-900 tel: (82)-(31)-209-1907 fax: (82)-(31)-209-1899 home page: http:// www.intl.samsungsemi.com printed in the republic of korea
  
        the s3c8238/c8235/f8235 microcontroller user's manual is designed for application designers and programmers who are using the s3c8238/c8235/f8235 microcontroller for application development. it is organized in two main parts: part i programming model part ii hardware descriptions part i contains software-related information to familiarize you with the microcontroller's architecture, programming model, instruction set, and interrupt structure. it has six chapters: chapter 1 product overview chapter 2 address spaces chapter 3 addressing modes chapter 4 control registers chapter 5 interrupt structure chapter 6 instruction set chapter 1, "product overview," is a high-level introduction to s3c8238/c8235/f8235 with general product descriptions, as well as detailed information about individual pin characteristics and pin circuit types. chapter 2, "address spaces," describes program and data memory spaces, the internal register file, and register addressing. chapter 2 also describes working register addressing, as well as system stack and user-defined stack operations. chapter 3, "addressing modes," contains detailed descriptions of the addressing modes that are supported by the s3c8-series cpu. chapter 4, "control registers," contains overview tables for all mapped system and peripheral control register values, as well as detailed one-page descriptions in a standardized format. you can use these easy-to-read, alphabetically organized, register descriptions as a quick-reference source when writing programs. chapter 5, "interrupt structure," describes the s3c8238/c8235/f8235 interrupt structure in detail and further prepares you for additional information presented in the individual hardware module descriptions in part ii. chapter 6, "instruction set," describes the features and conventions of the instruction set used for all s3c8-series microcontrollers. several summary tables are presented for orientation and reference. detailed descriptions of each instruction are presented in a standard format. each instruction description includes one or more practical examples of how to use the instruction when writing an application program. a basic familiarity with the information in part i will help you to understand the hardware module descriptions in part ii. if you are not yet familiar with the s3c-series microcontroller family and are reading this manual for the first time, we recommend that you first read chapters 1?3 carefully. then, briefly look over the detailed information in chapters 4, 5, and 6. later, you can reference the information in part i as necessary. part ii "hardware descriptions," has detailed information about specific hardware components of the s3c8238/c8235/f8235 microcontroller. also included in part ii are electrical, mechanical, flash mcu, and development tools data. it has 16 chapters: chapter 7 clock circuit chapter 8 reset and power-down chapter 9 i/o ports chapter 10 basic timer chapter 11 8-bit timer a/b chapter 12 16-bit timer 1 chapter 13 watch timer chapter 14 lcd controller/driver chapter 15 10-bit analog-to-digital converter chapter 16 voltage booster chapter 17 voltage level detector chapter 18 pattern generation module chapter 19 electrical data chapter 20 mechanical data chapter 21 s3f8235 flash mcu chapter 22 development tools two order forms are included at the back of this manual to facilitate customer order for s3c8238/c8235/f8235 microcontrollers: the mask rom order form, and the mask option selection form. you can photocopy these forms, fill them out, and then forward them to your local samsung sales representative.
 

           
          !"#$$!
  
        
     
  s3c8-series microcontrollers ................................................................................................... .................... 1-1 s3c8238/c8235/f8235 microcontroller............................................................................................ ............ 1-1 features....................................................................................................................... ................................. 1-2 block diagram .................................................................................................................. ............................ 1-3 pin assignment ................................................................................................................. ............................ 1-4 pin assignment ................................................................................................................. ............................ 1-5 pin assignment ................................................................................................................. ............................ 1-6 pin descriptions ............................................................................................................... ............................. 1-7 pin circuits ................................................................................................................... ........................ 1-9     overview ....................................................................................................................... ................................ 2-1 program memory (rom) ........................................................................................................... ................... 2-2 smart option ................................................................................................................... ..................... 2-3 register architecture .......................................................................................................... .......................... 2-4 register page pointer (pp) ..................................................................................................... ............. 2-6 register set 1................................................................................................................. ...................... 2-7 register set 2................................................................................................................. ...................... 2-7 prime register space ........................................................................................................... ............... 2-8 working registers.............................................................................................................. .................. 2-9 using the register points ...................................................................................................... ............. 2-10 register addressing............................................................................................................ .......................... 2-12 common working register area (c0h?cfh) ..................................................................................... 2-14 4-bit working register addressing .............................................................................................. ........ 2-15 8-bit working register addressing .............................................................................................. ........ 2-17 system and user stack .......................................................................................................... ...................... 2-19      overview ....................................................................................................................... ................................ 3-1 register addressing mode (r)................................................................................................... ................... 3-2 indirect register addressing mode (ir)......................................................................................... ............... 3-3 indexed addressing mode (x) .................................................................................................... .................. 3-7 direct address mode (da) ....................................................................................................... ..................... 3-10 indirect address mode (ia) ..................................................................................................... ...................... 3-12 relative address mode (ra) ..................................................................................................... ................... 3-13 immediate mode (im) ............................................................................................................ ............... 3-14
   
      
      overview....................................................................................................................... ........................ 4-1        overview ....................................................................................................................... ................................ 5-1 interrupt types ................................................................................................................ ..................... 5-2 s3c8238/c8235 interrupt structure .............................................................................................. ....... 5-3 interrupt vector addresses..................................................................................................... .............. 5-5 enable/disable interrupt instructions (ei, di) ................................................................................. ...... 5-7 system-level interrupt control registers....................................................................................... ...... 5-7 interrupt processing control points............................................................................................ .......... 5-8 peripheral interrupt control registers ......................................................................................... ......... 5-9 system mode register (sym) ..................................................................................................... ......... 5-10 interrupt mask register (imr) .................................................................................................. ............ 5-11 interrupt priority register (ipr) .............................................................................................. .............. 5-12 interrupt request register (irq)............................................................................................... ........... 5-14 interrupt pending function types ............................................................................................... ......... 5-15 interrupt source polling sequence.............................................................................................. ......... 5-16 interrupt service routines ..................................................................................................... ............... 5-16 generating interrupt vector addresses .......................................................................................... ...... 5-17 nesting of vectored interrupts................................................................................................. ............. 5-17       overview ....................................................................................................................... ................................ 6-1 data types ..................................................................................................................... ...................... 6-1 register addressing ............................................................................................................ ................. 6-1 addressing modes............................................................................................................... ................. 6-1 flags register (flags) ......................................................................................................... .............. 6-6 flag descriptions.............................................................................................................. .................... 6-7 instruction set notation ....................................................................................................... ................. 6-8 condition codes ................................................................................................................ ................... 6-12 instruction descriptions ....................................................................................................... ................. 6-13
  
       
      !   "  overview ....................................................................................................................... ................................ 7-1 system clock circuit ........................................................................................................... ................. 7-1 clock status during power-down modes ........................................................................................... .7-2 system clock control register (clkcon)......................................................................................... .7-3 # $$% 
&'  system reset................................................................................................................... ............................. 8-1 overview ....................................................................................................................... ....................... 8-1 normal mode reset operation .................................................................................................... ........ 8-1 hardware reset values .......................................................................................................... ............. 8-2 power-down modes............................................................................................................... ....................... 8-5 stop mode ...................................................................................................................... ...................... 8-5 idle mode...................................................................................................................... ........................ 8-6 ( )
 overview ....................................................................................................................... ................................ 9-1 port 1......................................................................................................................... ........................... 9-7 port 2......................................................................................................................... ........................... 9-11 port 3......................................................................................................................... ........................... 9-13 port 4......................................................................................................................... ........................... 9-16  * +%, overview ....................................................................................................................... ................................ 10-1 basic timer (bt) ............................................................................................................... ................... 10-1 basic timer control register (btcon) ........................................................................................... .... 10-1 basic timer function description ............................................................................................... ......... 10-3   #&-%,)+ 8-bit timer a .................................................................................................................. ............................... 11-1 overview ....................................................................................................................... ....................... 11-1 function description ........................................................................................................... ................. 11-2 timer a control register (tacon) ............................................................................................... ...... 11-3 block diagram.................................................................................................................. .................... 11-4 8-bit timer b .................................................................................................................. ............................... 11-5 overview ....................................................................................................................... ....................... 11-5
   
      
   &- %,  overview ....................................................................................................................... ................................ 12-1 function description........................................................................................................... .................. 12-2 timer 1 control register (t1con)............................................................................................... ........ 12-3 block diagram .................................................................................................................. .................... 12-4   .%, overview ....................................................................................................................... ................................ 13-1 watch timer control register (wtcon: r/w) ................................................................................... 13- 2 watch timer circuit diagram .................................................................................................... ........... 13-3   /'  )' overview ....................................................................................................................... ................................ 14-1 lcd circuit diagram............................................................................................................ ................. 14-2 lcd ram address area........................................................................................................... ............ 14-3 lcd control register (lcon), d0h............................................................................................... ...... 14-4 lcd mode register (lmod) ....................................................................................................... ......... 14-5 lcd key strobe output mode ..................................................................................................... ......... 14-7 lcd drive voltage .............................................................................................................. .................. 14-8 lcd seg/com signals............................................................................................................ ............ 14-8 lcd voltage driving method ..................................................................................................... ........... 14-14   *&- & &'  overview ....................................................................................................................... ................................ 15-1 function description........................................................................................................... ........................... 15-1 conversion timing.............................................................................................................. .................. 15-2 a/d converter control register (adcon) ......................................................................................... .. 15-2 internal reference voltage levels .............................................................................................. ......... 15-3 block diagram .................................................................................................................. .................... 15-4   0 +  16 voltage booster............................................................................................................. ........................... 16-1 overview ....................................................................................................................... ................................ 16-1 function description........................................................................................................... ........................... 16-1 block diagram .................................................................................................................. ............................. 16-2
  
         
  ! 0 /'  overview ....................................................................................................................... ................................ 17-1 voltage level detector control register (vldcon) ........................................................................... 17-3  #
1   overview ....................................................................................................................... ................................ 18-1 pattern gneration flow ......................................................................................................... ............... 18-1  ( $' overview ....................................................................................................................... ....................... 19-1 * ' overview ....................................................................................................................... ....................... 20-1   2#2/34 overview ....................................................................................................................... ................................ 21-1 operating mode characteristics................................................................................................. .......... 21-6  ' ,%  overview ....................................................................................................................... ................................ 22-1 shine .......................................................................................................................... .......................... 22-1 sama assembler ................................................................................................................. ................ 22-1 sasm88 ......................................................................................................................... ...................... 22-1 hex2rom ........................................................................................................................ ................... 22-1 target boards .................................................................................................................. .................... 22-1 TB8238/5 target board.......................................................................................................... .............. 22-3 smds2+ selection (sam8) ........................................................................................................ .......... 22-5 idle led ....................................................................................................................... ...................... 22-5 stop led ....................................................................................................................... .................... 22-5

  
         % &  % !"  !"  1-1 s3c8238/c8235/f8235 block diagram ..................................................................... 1-3 1-2 s3c8238/c8235/f8235 pin assignment (64-sdip) .................................................. 1-4 1-3 s3c8238/c8235/f8235 pin assignment (64-qfp) ................................................... 1-5 1-4 s3c8238/c8235/f8235 pin assignment (64-lqfp) ................................................. 1-6 1-5 pin circuit type b (  ) ........................................................................................ 1-9 1-6 pin circuit type c ...................................................................................................... 1-9 1-7 pin circuit type d-2 (p3) ........................................................................................... 1-9 1-8 pin circuit type d-4 (p0.0-p0.7 except p0.4)........................................................... 1-9 1-9 pin circuit type d-4? (p0.4) ....................................................................................... 1-10 1-10 pin circuit type f-19 (p1.4-p1.7) .............................................................................. 1-10 1-11 pin circuit type f-20 (p1.0-p1.3) .............................................................................. 1-11 1-12 pin circuit type h (seg/com).................................................................................. 1-11 1-13 pin circuit type h-4 ................................................................................................... 1-1 2 1-14 pin circuit type h-14 (p2, p4) ................................................................................... 1-12 2-1 program memory address space.............................................................................. 2-2 2-2 smart option .............................................................................................................. 2 -3 2-3 internal register file organization............................................................................. 2-5 2-4 register page pointer (pp)........................................................................................ 2-6 2-5 set 1, set 2, prime area register, and lcd data register map............................... 2-8 2-6 8-byte working register areas (slices)..................................................................... 2-9 2-7 contiguous 16-byte working register block ............................................................. 2-10 2-8 non-contiguous 16-byte working register block ..................................................... 2-11 2-9 16-bit register pair .................................................................................................... 2-1 2 2-10 register file addressing ............................................................................................ 2-13 2-11 common working register area ............................................................................... 2-14 2-12 4-bit working register addressing ............................................................................ 2-16 2-13 4-bit working register addressing example............................................................. 2-16 2-14 8-bit working register addressing ............................................................................ 2-17 2-15 8-bit working register addressing example............................................................. 2-18 2-16 stack operations........................................................................................................ 2- 19 3-1 register addressing................................................................................................... 3-2 3-2 working register addressing .................................................................................... 3-2 3-3 indirect register addressing to register file............................................................. 3-3 3-4 indirect register addressing to program memory ..................................................... 3-4 3-5 indirect working register addressing to register file .............................................. 3-5 3-6 indirect working register addressing to program or data memory.......................... 3-6 3-7 indexed addressing to register file .......................................................................... 3-7 3-8 indexed addressing to program or data memory with short offset .......................... 3-8 3-9 indexed addressing to program or data memory...................................................... 3-9 3-10 direct addressing for load instructions ..................................................................... 3-10 3-11 direct addressing for call and jump instructions ...................................................... 3-11 3-12 indirect addressing .................................................................................................... 3-1 2 3-13 relative addressing ................................................................................................... 3-13 3-14 immediate addressing ............................................................................................... 3-14
   
       
  % &  % !"  !"  4-1 register description format....................................................................................... 4-4 5-1 s3c8-series interrupt types ...................................................................................... 5-2 5-2 s3c8238/c8235/f8235 interrupt structure................................................................ 5-4 5-3 rom vector address area......................................................................................... 5-5 5-4 interrupt function diagram......................................................................................... 5-8 5-5 system mode register (sym) .................................................................................... 5-10 5-6 interrupt mask register (imr) .................................................................................... 5-11 5-7 interrupt request priority groups............................................................................... 5-12 5-8 interrupt priority register (ipr) .................................................................................. 5-13 5-9 interrupt request register (irq) ............................................................................... 5-14 6-1 system flags register (flags) ................................................................................ 6-6 7-1 main oscillator circuit (crystal or ceramic oscillator) ............................................... 7-1 7-2 main oscillator circuit (rc oscillator) ........................................................................ 7-1 7-3 system clock circuit diagram.................................................................................... 7-2 7-4 system clock control register (clkcon) ................................................................ 7-3 7-5 oscillator control register (osccon) ...................................................................... 7-4 7-6 stop control register (stpcon) ............................................................................ 7-4 9-1 port 0 high-byte control register (p0conh)............................................................ 9-4 9-2 port 0 low-byte control register (p0conl) ............................................................. 9-5 9-3 port 0 interrupt control register (p0int)................................................................... 9-6 9-4 port 0 interrupt pending register (p0pnd)................................................................ 9-6 9-5 port 1 high-byte control register (p1conh)............................................................ 9-8 9-6 port 1 low-byte control register (p1conl) ............................................................. 9-9 9-7 port 1 pull-up control register (p1pup).................................................................... 9-10 9-8 port 2 high-byte control register (p2conh)............................................................ 9-11 9-9 port 2 low-byte control register (p2conl) ............................................................. 9-12 9-10 port 3 control register (p3con) ............................................................................... 9-14 9-11 port 3 interrupt control register (p3int)................................................................... 9-15 9-12 port 3 interrupt pending register (p3pnd)................................................................ 9-15 9-13 port 4 control register (p4con) ............................................................................... 9-16
  
        
 % &  % !"  !"  10-1 basic timer control register (btcon) ..................................................................... 10-2 10-2 basic timer block diagram........................................................................................ 10-4 11-1 timer a control register (tacon) ........................................................................... 11-3 11-2 timer a functional block diagram ............................................................................ 11-4 11-3 timer b functional block diagram ............................................................................ 11-5 11-4 timer b control register (tbcon) ........................................................................... 11-6 11-5 timer b registers ...................................................................................................... 11- 6 11-6 carrier on/off control register ................................................................................... 11-7 12-1 timer 1 control register (t1con) ............................................................................ 12-3 12-2 timer 1 functional block diagram............................................................................. 12-4 13-1 watch timer circuit diagram..................................................................................... 13-3 14-1 lcd function diagram............................................................................................... 14-1 14-2 lcd circuit diagram .................................................................................................. 14-2 14-3 lcd display data ram organization ........................................................................ 14-3 14-4 lcd mode contol register ........................................................................................ 14-6 14-5 key strobe contol register........................................................................................ 14-7 14-6 select/no-select bias signals in static display mode ............................................... 14-8 14-7 select/no-select bias signals in 1/4 duty, 1/3 bias display mode............................ 14-9 14-8 select/no-select bias signals in 1/8 duty, 1/4 bias display mode............................ 14-9 14-9 key input check sequence during key strobe out duration .................................... 14-10 14-10 example of key strobe mode with 1/4 duty seg output ......................................... 14-11 14-11 lcd signal and wave forms example in 1/8 duty, 1/4 bias display mode ............. 14-12 14-12 lcd signals and wave forms example in 1/4 duty, 1/3 bias display mode............ 14-13 14-13 voltage dividing resistor circuit diagram ................................................................. 14-14 15-1 a/d converter control register (adcon) ................................................................. 15-2 15-2 a/d conversion interrupt register (adint) ............................................................... 15-3 15-3 a/d converter data register (addatah/l).............................................................. 15-3 15-4 a/d converter functional block diagram .................................................................. 15-4 16-1 voltage booster block diagram ................................................................................. 16-2 16-2 pin connection example............................................................................................ 16-2
   
         
 % &  % !"  !"  17-1 vld control register (vldcon) ............................................................................... 17-1 17-2 block diagram for voltage level detect..................................................................... 17-2 17-2 voltage level detect circuit and control register ..................................................... 17-3 18-1 pattern generation flow............................................................................................. 18-1 18-2 pg control register (pgcon)................................................................................... 18-2 18-3 pattern generation circuit diagram ........................................................................... 18-2 19-1 input timing for external interrupts (ports 0) ............................................................. 19-5 19-2 input timing for  .............................................................................................. 19-5 19-3 stop mode release timing initiated by  .......................................................... 19-6 19-4 stop mode(main) release timing initiated by interrupts ........................................... 19-7 19-5 stop mode(sub) release timing initiated by interrupts ............................................. 19-7 19-6 recommended a/d converter circuit for highest absolute accuracy....................... 19-9 19-7 clock timing measurement at x in ............................................................................ 19-11 19-8 lvr (low voltage reset) timing ............................................................................... 19-13 19-9 operating voltage range ........................................................................................... 19-14 20-1 64-sdip-750 package dimensions............................................................................ 20-1 20-2 64-qfp-1420f package dimensions......................................................................... 20-2 20-3 64-lqfp-1010-an package dimensions................................................................... 20-3 21-1 s3f8235 pin assignments (64-sdip package) ......................................................... 21-2 21-2 s3f8235 pin assignments (64-qfp package) .......................................................... 21-3 21-3 s3f8235 pin assignments (64-lqfp package) ........................................................ 21-4 21-4 lvr (low voltage reset) timing ............................................................................... 21-9 21-5 operating voltage range ........................................................................................... 21-10 22-1 smds product configuration (smds2+) ................................................................... 22-2 22-2 TB8238/5 target board configuration ...................................................................... 22-3 22-3 40-pin connectors (j101, j102) for TB8238/5........................................................... 22-6 22-4 s3c8238/c8235/f8235 probe adapter cables for 64-qfp package ....................... 22-6
  
       &  &  % !"  !"  1-1 s3c8238/c8235/f8235 pin descriptions (64-sdip) ................................................. 1-7 2-1 s3c8238/c8235/f8235 register type summary...................................................... 2-3 4-1 set 1 registers........................................................................................................... 4-1 4-2 set 1, bank 0 registers ............................................................................................. 4-2 4-3 set 1, bank 1 registers ............................................................................................. 4-3 5-1 interrupt vectors......................................................................................................... 5 -6 5-2 interrupt control register overview........................................................................... 5-7 5-3 interrupt source control and data registers ............................................................. 5-9 6-1 instruction group summary ....................................................................................... 6-2 6-2 flag notation conventions ......................................................................................... 6-8 6-3 instruction set symbols ............................................................................................. 6-8 6-4 instruction notation conventions ............................................................................... 6-9 6-5 opcode quick reference........................................................................................... 6-10 6-6 condition codes......................................................................................................... 6-1 2 8-1 s3f8235 set 1 register values after  (mask rom mode) ............................. 8-2 8-2 s3f8235 set 1, bank 0 register values after  (mask rom mode)................ 8-3 8-3 s3f8235 set 1, bank 1 register values after  (mask rom mode)................ 8-4 9-1 s3c8238/c8235 port configuration overview........................................................... 9-1 9-2 port data register summary ..................................................................................... 9-2 13-1 watch timer control register (wtcon): set 1, bank 1, fah, r/w ........................ 13-2 14-1 lcd control register (lcon) organization .............................................................. 14-4 14-2 lcd mode register ..................................................................................................... 14-5 14-3 frame frequency according to lcd clock signal (lcdck) ..................................... 14-5 14-4 maximum number of display digits per duty cycle .................................................. 14-6 14-5 lcd drive voltage values ......................................................................................... 14-8 16-1 voltage booster absolute maximum ratings............................................................. 16-3 16-2 voltage booster electrical characteristics ................................................................. 16-3 17-1 vldcon value and detection level ......................................................................... 17-3 17-2 characteristics of voltage level detect circuit .......................................................... 17-4
   
      
 &  &  % !"  !"  19-1 absolute maximum ratings........................................................................................ 19-2 19-2 d.c. electrical characteristics .................................................................................... 19-2 19-3 a.c. electrical characteristics .................................................................................... 19-5 19-4 input/output capacitance........................................................................................... 19-6 19-5 data retention supply voltage in stop mode ............................................................ 19-6 19-6 a/d converter electrical characteristics .................................................................... 19-8 19-7 main oscillator frequency (f  ) ............................................................................. 19-10 19-8 main oscillator clock stabilization time (t  )........................................................... 19-10 19-9 ub oscillator frequency (f  ) ................................................................................. 19-11 19-10 sub oscillator(crystal) stabilization time (t  ) ......................................................... 19-11 19-11 analog circuit characteristics and consumed current.............................................. 19-12 19-12 lvr(low voltage reset) circuit characteristics ....................................................... 19-13 21-1 descriptions of pins used to read/write the eprom............................................... 21-5 21-2 comparison of s3f8235 and s3c8235 features ...................................................... 21-5 21-3 operating mode selection criteria ............................................................................. 21-6 21-4 d.c electrical characteristics ..................................................................................... 21-6 21-5 lvr(low voltage reset) circuit characteristics ....................................................... 21-9 22-1 power selection settings for TB8238/5...................................................................... 22-4 22-2 power selection settings for eva chip operation (for using smds2+ only) .......... 22-4 22-3 the smds2+ tool selection setting.......................................................................... 22-5
  
           ' (  % !"  )(  # *++ ( using the page pointer for ram clear (page 0, page 1).......................................................................... .... 2-6 setting the register pointers .................................................................................................. ...................... 2-10 using the rps to calculate the sum of a series of registers .................................................................... .. 2-11 addressing the common working register area.................................................................................... ..... 2-15 standard stack operations using push and pop................................................................................... ... 2-20 )(  # 
& " * using the timer a .............................................................................................................. ........................... 11-8 using the timer b .............................................................................................................. ........................... 11-9 )(  # ,
(  & "  using the timer 1 .............................................................................................................. ........................... 12-5 )(  # - ) & " using the watch timer .......................................................................................................... ....................... 13-4 )(  .# /'  '  using the lcd display.......................................................................................................... ........................ 14-15 using the lcd key strobe and display ........................................................................................... ............. 14-17 )(  # $
*%
&
' %    using the adc interrupt........................................................................................................ ........................ 15-5 using the adc main routine ..................................................................................................... ................... 15-6 )(  0# 1 % / '   using the voltage level detector ............................................................................................... .................. 17-5 )(  #   2  + using the pattern generation ................................................................................................... .................... 18-3

  
          %    %   !" % 3+ 4  !"  adcon a/d converter control register ..................................................................................4-5 adint a/d conversion interrupt register ..............................................................................4-6 btcon basic timer control register......................................................................................4-7 clkcon system clock control register ...................................................................................4-8 flags system flags register................................................................................................4-9 imr interrupt mask register ..............................................................................................4-10 iph instruction pointer (high byte) ...................................................................................4-11 ipl instruction pointer (low byte) ....................................................................................4-11 ipr interrupt priority register ............................................................................................4-12 irq interrupt request register..........................................................................................4-13 kscon key strobe control register .......................................................................................4-14 lcon lcd control register..................................................................................................4-15 lmod lcd mode control register........................................................................................4-16 osccon oscillator control register ..........................................................................................4-1 7 p0conh port 0 control register (high byte) ............................................................................4-18 p0conl port 0 control register (low byte) .............................................................................4-19 p0int port 0 interrupt control register .................................................................................4-20 p0pnd port 0 interrupt pending register ...............................................................................4-21 p1conh port 1 control register (high byte) ............................................................................4-22 p1conl port 1 control register (low byte) .............................................................................4-23 p1pur port 1 pull-up control register ...................................................................................4-24 p2conh port 2 control register (high byte) ............................................................................4-25 p2conl port 2 control register (low byte) .............................................................................4-26 p3con port 3 control register ...............................................................................................4- 27 p3int port 3 interrupt control register .................................................................................4-28 p3pnd port 3 interrupt pending register ...............................................................................4-29 p4con port 4 control register ...............................................................................................4-3 0 pgcon pattern generation control register...........................................................................4-31
   
         
 %    %   !" % 3+ 4  !"  pp register page pointer ................................................................................................ 4-32 rp0 register pointer 0....................................................................................................... 4- 33 rp1 register pointer 1....................................................................................................... 4- 33 sph stack pointer (high byte) ........................................................................................... 4-34 spl stack pointer (low byte)............................................................................................ 4-34 stpcon stop control register ................................................................................................. 4- 35 sym system mode register ............................................................................................... 4-36 t1con timer 1 control register ............................................................................................ 4-37 tacon timer a control register............................................................................................ 4-38 tbcon timer b control register............................................................................................ 4-39 tintpnd timer a,1 interrupt pending register......................................................................... 4-40 vldcon voltage level detector control register .................................................................... 4-41 wtcon watch timer control register.................................................................................... 4-42
  
      
    3    %   !" % "  !"  adc add with carry............................................................................................................. 6-14 add add....................................................................................................................... .......6-15 and logical and ............................................................................................................... .6-16 band bit and .................................................................................................................. .....6-17 bcp bit compare ............................................................................................................... .6-18 bitc bit complement ..........................................................................................................6 -19 bitr bit reset ................................................................................................................. ....6-20 bits bit set .................................................................................................................. .......6-21 bor bit or .................................................................................................................... .....6-22 btjrf bit test, jump relative on false ................................................................................6-23 btjrt bit test, jump relative on true .................................................................................6-24 bxor bit xor .................................................................................................................. .....6-25 call call procedure ........................................................................................................... .6-26 ccf complement carry flag..............................................................................................6-27 clr clear ..................................................................................................................... ......6-28 com complement ...............................................................................................................6 -29 cp compare .................................................................................................................... .6-30 cpije compare, increment, and jump on equal..................................................................6-31 cpijne compare, increment, and jump on non-equal ..........................................................6-32 da decimal adjust............................................................................................................6 -33 dec decrement ................................................................................................................. .6-35 decw decrement word ........................................................................................................6-3 6 di disable interrupts........................................................................................................6- 37 div divide (unsigned) .......................................................................................................6- 38 djnz decrement and jump if non-zero ..............................................................................6-39 ei enable interrupts.........................................................................................................6 -40 enter enter ................................................................................................................... ........6-41 exit exit ..................................................................................................................... .........6-42 idle idle operation ........................................................................................................... ..6-43 inc increment.................................................................................................................. ..6-44 incw increment word ..........................................................................................................6 -45 iret interrupt return.......................................................................................................... .6-46 jp jump ....................................................................................................................... ....6-47 jr jump relative .............................................................................................................6 -48 ld load ....................................................................................................................... .....6-49 ldb load bit.................................................................................................................. .....6-51
   
     
    
 3    %   !" % "  !"  ldc/lde load memory ........................................................................................................... .. 6-52 ldcd/lded load memory and decrement.................................................................................... 6-54 ldci/ldei load memory and increment ..................................................................................... 6-55 ldcpd/ldepd load memory with pre-decrement ............................................................................ 6-56 ldcpi/ldepi load memory with pre-increment .............................................................................. 6-57 ldw load word.................................................................................................................. 6-58 mult multiply (unsigned)..................................................................................................... 6 -59 next next ..................................................................................................................... ....... 6-60 nop no operation .............................................................................................................. 6-61 or logical or................................................................................................................. . 6-62 pop pop from stack........................................................................................................... 6 -63 popud pop user stack (decrementing) ................................................................................ 6-64 popui pop user stack (incrementing) .................................................................................. 6-65 push push to stack ............................................................................................................ . 6-66 pushud push user stack (decrementing) .............................................................................. 6-67 pushui push user stack (incrementing) ................................................................................ 6-68 rcf reset carry flag ........................................................................................................ 6- 69 ret return.................................................................................................................... ..... 6-70 rl rotate left................................................................................................................ .. 6-71 rlc rotate left through carry........................................................................................... 6-72 rr rotate right ............................................................................................................... 6-73 rrc rotate right through carry ........................................................................................ 6-74 sb0 select bank 0 ............................................................................................................. 6-75 sb1 select bank 1 ............................................................................................................. 6-76 sbc subtract with carry..................................................................................................... 6- 77 scf set carry flag ............................................................................................................ 6-78 sra shift right arithmetic.................................................................................................. 6-7 9 srp/srp0/srp1 set register pointer ............................................................................................ ....... 6-80 stop stop operation ........................................................................................................... 6-81 sub subtract .................................................................................................................. .... 6-82 swap swap nibbles ............................................................................................................. 6-83 tcm test complement under mask................................................................................... 6-84 tm test under mask ........................................................................................................ 6-85 wfi wait for interrupt ........................................................................................................ 6-86 xor logical exclusive or ................................................................................................. 6-87

        

 
    samsung's s3c8-series of 8-bit single-chip cmos microcontrollers offers a fast and efficient cpu, a wide range of integrated peripherals, and various mask-programmable rom sizes. the major cpu features are: ? efficient register-oriented architecture ? selectable cpu clock sources ? idle and stop power-down mode released by interrupt or reset ? built-in basic timer with watchdog function a sophisticated interrupt structure recognizes up to eight interrupt levels. each level can have one or more interrupt sources and vectors. fast interrupt processing (within a minimum of four cpu clocks) can be assigned to specific interrupt levels. 
    the s3c8238/c8235/f8235 single-chip cmos microcontrollers are fabricated using the highly advanced cmos process, based on samsung?s latest cpu architecture. the s3c8235 is a microcontroller with a 16k-byte mask-programmable rom embedded. the s3f8235 is a microcontroller with a 16k-byte flash rom embedded. using a proven modular design approach, samsung engineers have successfully developed the s3c8238/c8235/f8235 by integrating the following peripheral modules with the powerful sam8 core: ? five programmable i/o ports, including three 8-bit ports and two 4-bit ports, for a total of 32 pins. ? eight bit-programmable pins for external interrupts. ? one 8-bit basic timer for oscillation stabilization and watchdog function (system reset). ? two 8-bit timer/counter and one 16-bit timer/counter with selectable operating modes. ? watch timer for real time ? 8-channel a/d converter the s3c8238/c8235/f8235 is versatile microcontroller for camera, lcd and adc application, etc. they are currently available in 64-pin lqfp, 64-pin qfp and 64-pin sdip package.

        ? sam88rc cpu core 
 ? 16k-bytes rom ? 632 -bytes ram    ? crystal, ceramic, rc ? crystal for subsystem clock ? cpu clock divider (1/1, 1/2, 1/8, 1/16)     ? 78 instructions ? idle and stop instructions added for power- down modes      ? 400 ns at 10-mhz f  (minimum)    ? 16 interrupt sources with 16 vector. ? 8 level, 16 vector interrupt structure     ? total 32 bit-programmable pins     ? one programmable 8-bit basic timer (bt) for oscillation stabilization control or watchdog timer function ? one 8-bit timer/counter (   ) with three operating modes; interval mode, capture mode and pwm mode. ? one 8-bit timer/counter (   ) carrier frequency (or pwm) generator. ? one 16-bit capture timer/counter (   ) with two operating modes; interval mode, capture mode for pulse period or duty.    ? real-time and interval time measurement. ? clock generation for lcd. !"  " #  ? 8(4)com x 24seg (max 24 digit) "#   ? eight analog input channels ? 20us conversion speed at 10mhz f  clock. $%   ? lcd drive voltage supply ? s/w control (enable/disable) !&$%' (!$') ? low voltage check to make system reset ? v  = 2.2v/2.6v/3.6v  *  ? pattern generation module triggered by timer match signal and s/w. $%"  +   ? voltage detector to indicate specific voltage. ? s/w control (2.4v, 2.7v, 3.3v, 4.5v) ,
 - ? support automatic key strobe output with lcd driver(maximum 4 x 12 key matrices).  %  '% ? -40 c to + 85 c  %$%'% ? 2.0 v to 5.5 v at 4 mhz f  (preliminary)  .%
 ? 64 pin sdip, 64 pin qfp, 64 pin lqfp    ? low voltage reset(lvr) level and enable/disable are at your hardwired option. (rom address 3e,3fh)

        


  
        ! "  #"$!"%  " !"%  
  " !"% 
  " !"%  
  & $'!"%  (  )  * + ,) )"-   # %  . / #  (0  1( 1  1 1* 2(20 *2(*2* +2(+2* 3(3*  .,.,+ 4  54!  4  54!  reset *2(!& *2! *2! (20! (2! (2!! (2+!& *2*6 2(20 7)()08 (2((20 73!(3!08 .  . ,. % "
  
1
 "
2+20+2(+2*  .,.,+ /% 01234233425/3425 ."%  

      
 ., ., .,* .,+   *2(!&!!3( *2!3 *2!3 *2*63* (2(3!( (23! (23! (2*3!* (2+!&3!+ .
. 4  4  ! ! 4!  4!  reset (2!!3! (2!3! (20!3!0 . .  2()( 2) 2) 2*)*  1*+2*10!  1+21!  1+21!(  1(+2(1+!9  1920!  12!0  102!  12+!  12*!+  1+2!*  1*2!  12(!  1  1(  19  1  10  1  1  1+  1*  1  1  1( (   * +20)01* 2)1 2)1 02+)+1(     + *   ( 9  0   + *   ( +9 + +0 + + ++ +* + + +( *9 * *0 * * *+ **   * +   0  9 (   * +   0  9 (   * +   0  9 *( * * /% 041234233425/3425 %(670")

       
 *2!3 *2!3 *2*63* (2(3!( (23! (23! (2*3!* (2+!&3!+ .
. 4  4  ! ! 4!  4!  reset (2!!3! (2!3! (20!3!0    
   * +   0  9 (   * +   0  9  
                                         
 
 
 
 
 
 
               ( +9 + +0 + + ++ +* + + +( *9 * *0 * * *+ **  102!  12+!  12*!+  1+2!*  1*2!  12(!  1  1(  19  1  10  1  1  1+  1*  1  1  1( ( /% 021234233425/3425 %(6708/)

      
    
   * +   0  9 (   * +                                   + +0 + + ++ +* + + +( *9 * *0 * * *+ **  1+2!*  1*2!  12(!  1  1(  19  1  10  1  1  1+  1*  1  1  1( ( *2!3 *2!3 *2*63* (2(3!( (23! (23! (2*3!* (2+!&3!+ .
. 4  4  ! ! 4!  4!  reset  
                          
               
 
 
 
 
 
 
 /% 071234233425/3425 %(670!8/) 

          -01234233425/3425"  (670") 9   
 "    
 91    /   p0.0-p0.7 i/o i/o port with bit-programmable pins. configurable to schmitt trigger input mode or output mode by software. pull-up resistors are assignable by software. pins can be assigned individually as external interrupt inputs with noise filters, interrupt enable/ disable, and interrupt pending control. p0.4 pin have high current drive capability. d-4 d-4? 11-14, 24-26 15 external interrupt (int0-int7) tbpwm t1out t1ck t1cap p1.0-p1.3 i/o port with bit-programmable pins. configurable to normal input and ad input mode or output mode. pin circuits are either push-pull or n-channel open-drain type. pull- up resistors are assignable by software. f-20 29-32 ad0-ad3 p1.4-p1.7 i/o port with bit-programmable pins. configurable to normal input and ad input mode and push-pull output. pull-up resistors are assignable by software. alternately configurable to output pins for lcd com and pg output. f-19 33-36 ad4-ad7 com7-com4 pg3-pg0 p2.0-p2.7 i/o port with bit-programmable pins. configurable to normal input mode or output mode. pin circuits are either push-pull or n- channel open-drain type. pull-up resistors are assignable by software. alternately configurable to output pins for lcd seg and key strobe. h-14 53 - 60 seg12-seg 19 kstr1-kstr 8 p3.0-p3.3 i/o port with bit-programmable pins. configurable to schmitt trigger input mode, push-pull output mode. the port 3 pins have high current drive capability. d-4 7-10 tapwm tack tacap buz kin0-kin3 

     -01234233425/3425"  (670")()  9   
  "    
 91    /   p4.0-4.3 i/o i/o port with bit-programmable pins. configurable to normal input mode and push-pull output mode. pull-up resistors are assignable by software. alternately configurable to output pins for lcd seg and pg output. the port 4 pins have high current drive capability. h-14 61-64 seg20-seg23 kstr9-kstr 12 ad0-ad7 i a/d converter analog input channels f-20 f-19 29-36 p1.0-p1.7 av 
a/d converter reference voltage ? 28 ? av  a/d converter ground 27 ca,cb capacitor terminal for voltage booster 5, 6 com0-com3 o lcd common signal output h 37-40 com4-com7 lcd common signal output f-19 33-36 p1.4-p1.7 seg0-seg 11 lcd segment signal output h 41-52 ? seg12-seg19 lcd segment signal output h-14 53-60 p2.0-p2.7 kstr1-kstr8 seg20-seg23 lcd segment signal output h-14 61-64 p4.0-p4.3 kstr9-kstr12 vlc1-vlc4 lcd power supply ? 1-4 ? tbpwm remote controller signal output(carrier output) or pwm output d-4? 15 p0.4 tapwm timera pwm output d-2 7 p3.0 tacap i timera capture input d-2 9 p3.2 tack timera clock source input d-2 8 p3.1 kin0-kin3 key strobe input d-4 7-10 p3.0-p3.3 reset system reset pin b 23 ? t1out o timer1 match toggle output d-4 24 p0.5 t1ck i timer1 clock source input d-4 25 p0.6 t1cap i timer1 capture input d-4 26 p0.7 pg0-pg3 o pattern generation output f-19 33-36 p1.4-p1.7 pg4-pg7 o pattern generation output h-14 61-64 p4.0-p4.3 test i test signal input pin (for factory use only; must be connected to v  ). ? 20 ? v  ? power supply input pin ? 16 ? v  ? ground pin ? 17 ?

         $'%"!"//  
.
   #"# /% 051 
(  ) '
 3'
 .
     )"#  )  /% 061 
     )"#  )  "
"$ " !    
 .
/% 0:1 
"04(2)     )"#  )  "
"$ " !    
 .
3"# :"  ;23! 
  3%  .
/% 031 
"07 (;1;0;1: ;17)

         )"#  (2+)  "
"$ " !    
 .
3"# :"  ;23! 
  3%  .
  4 !
<=  " 
<<7(2+8 /% 0<1 
"07=(;17)   
 > 3> .
    )"#  )  .
"$ " ! >+ 
) "
 3 ,)  3  1 )
 3 3% 
)
/% 0;1 
/0<(1701:)

        
     )"#  .
"$ " !  )  )
 3 !) )  /% 01 
/04;(1;012)   .  1 .  .  .  /% 041 
>(* )

        1 .  . .     )"#  .  /% 021 
>07   
 > 3> .
    )"#  )  .
"$ " ! > 
) "
 3 ,)  3  1 /% 071 
>07(4?7)

 
        the s3c8238/c8235/f8235 microcontroller has two types of address space: ? internal program memory (rom) ? internal data memory (ram) a 16-bit address bus supports program memory operations. a separate 8-bit register bus carries addresses and data between the cpu and the register file. the s3c8238/c8235/f8235 has an internal 8/16-kbyte mask-programmable rom and 632-byte ram.

 
     
      program memory (rom) stores program codes or table data. the s3c8238 has 8 kbytes of internal mask- programmable program memory. the s3c8235/f8235 has 16 kbytes of internal mask programmable program memory. the program memory address range is therefore 0h?3fffh (see figure 2-1). the first 256 bytes of the rom (0h-0ffh) are reserved for interrupt vector addresses. unused locations in this address range can be used as normal program memory. if you use the vector address area to store a program code, be careful not to overwrite the vector addresses stored in these locations. the rom address at which a program execution starts after a reset is 0100h. 
         
    

    !" ##$% & '#(# 


   

 
      # )% '"
*)+(,,#--  . + /0 / / / / / /
/ .&*1- '"2 3 4 / & 
4/ &
54/& 6' $-, # )% '"
*)+(,,#--  . + /0 / / / / / /
/ 6' $-, .&*"22 3 4"2.&*
4-2.&*     smart option is the rom option for start condition of the chip. the rom address used by smart option is from 003eh to 003fh. the s3c8235/c8238/f8235 only use 003eh. the default value of rom is ffh (lvr disable)

 
     
 in the s3c8238/c8235/f8235 implementation, the upper 64-byte area of register files is expanded two 64-byte areas, called set 1 and set 2 . the upper 32-byte area of set 1 is further expanded two 32-byte register banks (bank 0 and bank 1), and the lower 32-byte area is a single 32-byte common area. in addition, set 2 is logically expanded 2 separately addressable register pages, page 0?page 1. in case of s3c8238/c8235/f8235 the total number of addressable 8-bit registers is 632. of these 632 registers, 16 bytes are for cpu and system control registers, 24 bytes are for lcd data registers, 64 bytes are for peripheral control and data registers, 16 bytes are used as a shared working registers, and 512 registers are for general- purpose use. you can always address set 1 register locations, regardless of which of the 2 register pages is currently selected. set 1 locations, however, can only be addressed using direct addressing modes. the extension of register space into separately addressable areas (sets, banks, and pages) is supported by various addressing mode restrictions, the select bank instructions, sb0 and sb1, and the register page pointer (pp). specific register types and the area (in bytes) that they occupy in the register file are summarized in table 2?1.  
!"#!#$"#!%$#!%   &' general-purpose registers (including the 16-byte common working register area, two 192-byte prime register area, and two 64-byte set 2 area) lcd data registers cpu and system control registers mapped clock, peripheral, i/o control, and data registers 528 24 16 64    ' 632

 
          -      .-%*7- #   
0    -   8"#9$#%'-  *7- #- !",# *7- # !",5, +', ", : )%# '"-    
  -   -   - - ", 9#%;#'" #'*7- #- *7- #(,,#--"7+', - ", 9#%;#'" #'*7- #- *7- #(,,#--"7+', 8"#9$#%'-*7- # *7- #(,,#--"7+', 9#  *7- #- ((,,#--"7+',-            !   ( 

 
    )*) *) )+ , the s3c8-series architecture supports the logical expansion of the physical 256-byte internal register file (using an 8-bit data bus) into as many as 16 separately addressable register pages. page addressing is controlled by the register page pointer (pp, dfh). in the s3c8238/c8235/f8235 microcontroller, a paged register file expansion is implemented for lcd data registers, and the register page pointer must be changed to address other pages. after a reset, the page pointer's source value (lower nibble) and the destination value (upper nibble) are always "0000", automatically selecting page 0 as the source and destination page for register addressing. *7- #979'" #99   
*< . + /0 / / / / / /
/ - " '"#7- #%7- '"2 -3 - " '"397 '$##7- #%7- '"2 -3 '$#397   !" ;    #''" #'# %7- 
",#%" ,/ (;#,=##- '%# '"=# - ;2 ,- " '"",-'$#1$--;'=" 2'1 ' ;#7- #%7%'" #/>;-1$--;'$,2',?, ',,#-- ' ;#%7-/    -   + ,      ** ./0  &  + 12 
, ld pp,#00h ; destination 0, source 0 srp #0c0h ld r0,#0ffh ; page 0 ram clear starts ramcl0 clr @r0 djnz r0,ramcl0 clr @r0 ; r0 = 00h ld pp,#10h ; destination 1, source 0 ld r0,#0ffh ; page 1 ram clear starts ramcl1 clr @r0 djnz r0,ramcl1 clr @r0 ; r0 = 00h    

  

   

  
   

 
    )*))
 the term set 1 refers to the upper 64 bytes of the register file, locations c0h?ffh. the upper 32-byte area of this 64-byte space (e0h?ffh) is expanded two 32-byte register banks, bank 0 and bank 1 . the set register bank instructions, sb0 or sb1, are used to address one bank or the other. a hardware reset operation always selects bank 0 addressing. the upper two 32-byte areas (bank 0 and bank 1) of set 1 (e0h?ffh) contains 48 mapped system and peripheral control registers. the lower 32-byte area contains 16 system registers (d0h?dfh) and a 16-byte common working register area (c0h?cfh). registers in set 1 locations are directly accessible at all times using register addressing mode. the 16-byte working register area can only be accessed using working register addressing (for more information about working register addressing, please refer to chapter 3, ?addressing modes.?) )*)) the same 64-byte physical space that is used for set 1 locations c0h?ffh is logically duplicated to add another 64 bytes of register space. this expanded area of the register file is called set 2 . for the s3c8328/c8325/f8235, the set 2 address range (c0h?ffh) is accessible on pages 0-1. the logical division of set 1 and set 2 is maintained by means of addressing mode restrictions. you can use only register addressing mode to access set 1 locations. in order to access registers in set 2, you must use register indirect addressing mode or indexed addressing mode. the set 2 register area is commonly used for stack operations.

 
    ))*) ") the lower 192 bytes (00h?bfh) of the s3c8238/c8235/f8235's two 256-byte register pages is called prime register area. prime registers can be accessed using any of the seven addressing modes (see chapter 3, "addressing modes.") the prime register area on page 0 is immediately addressable following a reset. in order to address prime registers on pages 0, or 1 you must set the register page pointer (pp) to the appropriate source and destination values.          9#%;#",!) 8"#%$#%'- 9@",-- '" #' ., #7- #       9# %  .  *7- #(#   
0          % 
22 23"44

 
    56*)*) instructions can access specific 8-bit registers or 16-bit register pairs using either 4-bit or 8-bit address fields. when 4-bit working register addressing is used, the 256-byte register file can be seen by the programmer as one that consists of 328-byte register groups or "slices." each slice comprises of eight 8-bit registers. using the two 8-bit register pointers, rp1 and rp0, two working register slices can be selected at any one time to form a 16-byte working register block. using the register pointers, you can move this 16-byte register block anywhere in the addressable register file, except for the set 2 area. the terms slice and block are used in this manual to help you visualize the size and relative locations of selected working register spaces: ? one working register slice is 8 bytes (eight 8-bit working registers, r0?r7 or r8?r15) ? one working register block is 16 bytes (sixteen 8-bit working registers, r0?r15) all the registers in an 8-byte working register slice have the same binary value for their five most significant address bits. this makes it possible for each register pointer to point to one of the 24 slices in the register file. the base addresses for the two selected 8-byte register slices are contained in register pointers rp0 and rp1. after a reset, rp0 and rp1 always point to the 16-byte common area in set 1 (c0h?cfh). ;#7- #%'" #%'" - ' '"2 -'? ;#7- # -% - "7 ' 
 2 ='#:"7#7- #2':/




 *9
*7- #-**
 *9*7- #-**0   
      0    0   

  
)"   7 # '5 8+ ,

 
    /*9))*)  after a reset, rp# point to the working register common area: rp0 points to addresses c0h?c7h, and rp1 points to addresses c8h?cfh. to change a register pointer value, you load a new value to rp0 and/or rp1 using an srp or ld instruction. (see figures 2-6 and 2-7). with working register addressing, you can only access those two 8-bit slices of the register file that are currently pointed to by rp0 and rp1. you cannot, however, use the register pointers to select a working register space in set 2, c0h?ffh, because these locations can be accessed only using the indirect register or indexed addressing modes. the selected 16-byte working register block usually consists of two contiguous 8-byte slices. as a general programming guideline, it is recommended that rp0 point to the "lower" slice and rp1 point to the "upper" slice (see figure 2-6). because a register pointer can point to either of the two 8-byte slices in the working register block, you can flexibly define the working register area to support program requirements.      ** .0  srp #70h ; rp0 70h, rp1 78h srp1 #48h ; rp0 no change, rp1 48h, srp0 #0a0h ; rp0 a0h, rp1 no change clr rp0 ; rp0 00h, rp1 no change ld rp1,#0f8h ; rp0 no change, rp1 0f8h *
 *  
  '" 7$'$- <'#:"7 *7- #2': *7- # '" "-   - *9 *9
 0 
     : "  
7 '5 8' 8

 
    *0 *  
  '" 7$'$- <'#:"7 *7- #2': *7- # '" "-   - *9 *9
0*
 
    *  #   "  
7 '5 8' 8      ** ./0  "  0 & & calculate the sum of registers 80h?85h using the register pointer. the register addresses from 80h through 85h contain the values 10h, 11h, 12h, 13h, 14h, and 15 h, respectively: srp0 #80h ; rp0 80h add r0,r1 ; r0 r0 + r1 adc r0,r2 ; r0 r0 + r2 + c adc r0,r3 ; r0 r0 + r3 + c adc r0,r4 ; r0 r0 + r4 + c adc r0,r5 ; r0 r0 + r5 + c the sum of these six registers, 6fh, is located in the register r0 (80h). the instruction string used in this example takes 12 bytes of instruction code and its execution time is 36 cycles. if the register pointer is not used to calculate the sum of these registers, the following instruction sequence would have to be used: add 80h,81h ; 80h (80h) + (81h) adc 80h,82h ; 80h (80h) + (82h) + c adc 80h,83h ; 80h (80h) + (83h) + c adc 80h,84h ; 80h (80h) + (84h) + c adc 80h,85h ; 80h (80h) + (85h) + c now, the sum of the six registers is also located in register 80h. however, this instruction string takes 15 bytes of instruction code rather than 12 bytes, and its execution time is 50 cycles rather than 36 cycles.

 
     
  the s3c-series register architecture provides an efficient method of working register addressing that takes full advantage of shorter instruction formats to reduce execution time. with register (r) addressing mode, in which the operand value is the content of a specific register or register pair, you can access any location in the register file except for set 2. with working register addressing, you use a register pointer to specify an 8-byte working register space in the register file and an 8-bit register within that space. registers are addressed either as a single 8-bit register or as a paired 16-bit register space. in a 16-bit register pair, the address of the first 8-bit register is always an even number and the address of the next register is always an odd number. the most significant byte of the 16-bit data is always stored in the even-numbered register, and the least significant byte is always stored in the next (+1) odd-numbered register. working register addressing differs from register addressing as it uses a register pointer to identify a specific 8-byte working register space in the internal register file and a specific 8-bit register within that space. + *" . *"a
"41",,#--  ; 
7 ' 

 
      !"# $!#"  ( (,,#--"7 +',- 97 !",# *7- # !",5, (,,#--"7 +',- 97 *7- #(,,#--"7)" "29'" ,2*7- #9'" #    $#$% !"#" &"' !"#" %9$#%'-*7- #-         !" ;    #''" #'# %7-#%" ,/97- '" "'? ;,,#--2#7- #-" ;" #"#7- #?/ ;#7- #%'" #*9 "",%"," %'" ''"'? ;2 b--b'? ;#7- #? ' ;# ;"-  /(? ##- *9%'" - ' ' '"-0",*9
 '' '"-  ; -  ' ;''"='#:"7#7- ## /      8"#9$#%'-*7- # ( (,,#--"7 +',- "29'" , ' #7- #9'" # (  !"#" #!' !"#" 
1  

 
    "56*)*))+"19<"9, after a reset, register pointers rp0 and rp1 automatically select two 8-byte register slices in set 1, locations c0h? cfh, as the active 16-byte working register block: rp0 c0h?c7h rp1 c8h?cfh this 16-byte address range is called common area . that is, locations in this area can be used as working registers by operations that address any location on any page in the register file. typically, these working registers serve as temporary buffers for data operations between different pages.              9# %  .  *7- #(#   
0       ''="7;#,=##- #7- # %'" #-*9",*9
%'"  ' ; ''"='#:"7#7- ## ' '"-/ *94 *9
4

 


    
"  5 8

 
         ** .0"  5 8 as the following examples show, you should access working registers in the common area, locations c0h?cfh, using working register addressing mode only. )=  1. ld 0c2h,40h ; invalid addressing mode! use working register addressing instead: srp #0c0h ld r2,40h ; r2 (c2h) the value in location 40h 2. add 0c3h,#45h ; invalid addressing mode! use working register addressing instead: srp #0c0h add r3,#45h ; r3 (c3h) r3 + 45h - '56*)*)44)* each register pointer defines a movable 8-byte slice of working register space. the address information stored in a register pointer serves as an addressing "window" that makes it possible for instructions to access working registers very efficiently using short 4-bit addresses. when an instruction addresses a location in the selected working register area, the address bits are concatenated in the following way to form a complete 8-bit address: ? the high-order bit of the 4-bit address selects one of the register pointers ("0" selects rp0, "1" selects rp1). ? the five high-order bits in the register pointer select an 8-byte slice of the register space. ? the three low-order bits of the 4-bit address select one of the eight registers in the slice. as shown in figure 2-11, the result of this operation is that the five high-order bits from the register pointer are concatenated with the three low-order bits from the instruction address to form the complete address. as long as the address stored in the register pointer remains unchanged, the three bits from the address will always point to an address in the same 8-byte register slice. figure 2-12 shows a typical example of 4-bit working register addressing. the high-order bit of the instruction "inc r6" is "0", which selects rp0. the five high-order bits stored in rp0 (01110b) are concatenated with the three low-order bits of the instruction's 4-bit address (110b) to produce the register address 76h (01110110b).

 
    

 


 ! 


 "

 
#
 #
 
!  $
 %&'%( )

  "&* "&+ "&+ "&* ,! 
 #
 
 
!  
 - '5 8 "


 -./0 "&* *+++* *** *+++* ++* " *++* +++* )

 "&* 1   21'"2 %&'%( "&+ *++++ *** 
! - '5 8)= 

 
    # '56*)*)44)* you can also use 8-bit working register addressing to access registers in a selected working register area. to initiate 8-bit working register addressing, the upper four bits of the instruction address must contain the value "1100b." this 4-bit value (1100b) indicates that the remaining four bits have the same effect as 4-bit working register addressing. as shown in figure 2-13, the lower nibble of the 8-bit address is concatenated in much the same way as for 4-bit addressing: bit 3 selects either rp0 or rp1, which then supplies the five high-order bits of the final address; the three low-order bits of the complete address are provided by the original instruction. figure 2-14 shows an example of 8-bit working register addressing. the four high-order bits of the instruction address (1100b) specify 8-bit working register addressing. bit 4 ("1") selects rp1 and the five high-order bits in rp1 (10101b) become the five high-order bits of the register address. the three low-order bits of the register address (011) are provided by the three low-order bits of the 8-bit instruction address. the five address bits from rp1 and the three address bits from the instruction are concatenated to form the complete register address, 0abh (10101011b). !  
 !  
 "

 
#
 #
 
!  $
 )

  "&* "&+ "&+ "&* 
 
!  


 ! 
 !  3


  
- # '5 8

 
    ! 
     24"++5"62 "&* *++** *** ++**+*++ )

 "&+ "++ "


 -*$7/0 "&+ +*+*+ *** +*+*+ *++ )
 
 3


 
% # '5 8)= 

 
      

 the s3c8-series microcontrollers use the system stack for data storage, subroutine calls and returns. the push and pop instructions are used to control system stack operations. the s3c8238/c8235 architecture supports stack operations in the internal register file. 8  return addresses for procedure calls, interrupts, and data are stored on the stack. the contents of the pc are saved to stack by a call instruction and restored by the ret instruction. when an interrupt occurs, the contents of the pc and the flags register are pushed to the stack. the iret instruction then pops these values back to their original locations. the stack address value is always decreased by one before a push operation and increased by one after a pop operation. the stack pointer (sp) always points to the stack frame stored on the top of the stack, as shown in figure 2-16. ) 3
  
    ) 3
  
 
    3 8 &'/ &'4 &'4 &'/    3 ($)
**#"" +!,
**#"" 
7 8  / 4&8 you can freely define stacks in the internal register file as data storage locations. the instructions pushui, pushud, popui, and popud support user-defined stack operations. 8 + 32 9, register locations d8h and d9h contain the 16-bit stack pointer (sp) that is used for system stack operations. the most significant byte of the sp address, sp15?sp8, is stored in the sph register (d8h), and the least significant byte, sp7?sp0, is stored in the spl register (d9h). after a reset, the sp value is undetermined. because only internal memory space is implemented in the s3c8238/c8235/f8235, the spl must be initialized to an 8-bit value in the range 00h?ffh. the sph register is not needed and can be used as a general-purpose register, if necessary. when the spl register contains the only stack pointer value (that is, when it points to a system stack in the register file), you can use the sph register as a general-purpose data register. however, if an overflow or underflow condition occurs as a result of increasing or decreasing the stack address value in the spl register during normal stack operations, the value in the spl register will overflow (or underflow) to the sph register, overwriting any other data that is currently stored there. to avoid overwriting data in the sph register, you can initialize the spl value to "ffh" instead of "00h".

 
         ** .8 / /9   the following example shows you how to perform stack operations in the internal register file using push and pop instructions: ld spl,#0ffh ; spl ffh ; (normally, the spl is set to 0ffh by the initialization ; routine)     push pp ; stack address 0feh pp push rp0 ; stack address 0fdh rp0 push rp1 ; stack address 0fch rp1 push r3 ; stack address 0fbh r3    pop r3 ; r3 stack address 0fbh pop rp1 ; rp1 stack address 0fch pop rp0 ; rp0 stack address 0fdh pop pp ; pp stack address 0feh

       
  instructions that are stored in program memory are fetched for execution using the program counter. instructions indicate the operation to be performed and the data to be operated on. addressing mode is the method used to determine the location of the data operand. the operands specified in sam88rc instructions may be condition codes, immediate data, or a location in the register file, program memory, or data memory. the s3c-series instruction set supports seven explicit addressing modes. not all of these addressing modes are available for each instruction. the seven addressing modes and their symbols are: ? register (r) ? indirect register (ir) ? indexed (x) ? direct address (da) ? indirect address (ia) ? relative address (ra) ? immediate (im)

     
     in register addressing mode (r), the operand value is the content of a specified register or register pair (see figure 3-1). working register addressing differs from register addressing in that it uses a register pointer to specify an 8-byte working register space in the register file and an 8-bit register within that space (see figure 3-2).   
 
 
   
 
 
   
    


 
      
  ! "   
 #  $ % &'  $
 '  (  
 
      )  * 
 
 
      +
 & ,
 
 
  ' & ,
 
 - ( ! $.    
  ! "   
 #  -/ 0 % &'  -   0   
 
'   *  . ,
 
  1    )  * 
 
   2 3"4 5  - "  
    ( . ,
 
 ,  )"4 
  5  -      

     

     in indirect register (ir) addressing mode, the content of the specified register or register pair is the address of the operand. depending on the instruction used, the actual address may point to a register in the register file, to program memory (rom), or to an external memory space (see figures 3-3 through 3-6). you can use any 8-bit register to indirectly address another register. any 16-bit register pair can be used to indirectly address another memory location. please note, however, that you cannot access locations c0h?ffh in set 1 using the indirect register addressing mode.    (     *  
  "" 
 
 
   
    


 
      
  ! "   
 # 3 6"7 $ % &'  "7 $
 '  (  
 
      )  * 
 
  
 
 
         

      

         
  
 
   
 (      )  * "   
 # 33 60 8 60    )  * 
 
  
 
  9 "$    )  * -:4
   
     )  *      

     

       
  
   
   !"#$% 

&'(
) *+
,! $ &- . /!## "#$ 
0 !$
   1 !$
2
 * .
2
          

      

       +
 & ,
 
   "   
 # 3 ;/6: %      *  3 2/6-+ %      *  3 6+/  %      *     )  * 
 
    
 
     
 (   
'    )  *   )  *    )  *   )  *  0
 
  & ,
 
 
- ( +! 3"4 " 
 
-:4
   
       *     * 5  - )"4 
  5  - "  
    ( . ,
 
 ,     !

           indexed (x) addressing mode adds an offset value to a base address during instruction execution in order to calculate the effective operand address (see figure 3-7). you can use indexed addressing mode to access locations in the internal register file or in external memory. please note, however, that you cannot access locations c0h?ffh in set 1 using indexed addressing mode. in short offset indexed addressing mode, the 8-bit displacement is treated as a signed integer in the range ?128 to +127. this applies to external memory accesses only (see figure 3-8.) for register file addressing, an 8-bit base address provided by the instruction is added to an 8-bit offset contained in a working register. for external memory accesses, the base address is stored in the working register pair designated in the instruction. the 8-bit or 16-bit offset given in the instruction is then added to that base address (see figure 3-9). the only instruction that supports indexed addressing mode for the internal register file is the load instruction (ld). the ldc and lde instructions support indexed addressing mode for internal program memory and for external data memory, when implemented. <   $.    
   
    ( ' &,
 
 - ( ! "   
 # 3 5/ =4">-? % &'  4"
  


 @    )  * 
 
  2 3"4  
 
  a 4   5  - "  
    ( . ,
 
 ,     " #   

           
,! 
0 *+  *+ 
   - . !$ ) .   
2
 * .
2
 !$
   1  !$ 3$  *+ 4 ,, 5 
   !"#$% -
'62 78
9: ;5<!# 
9=2 7 !
> -
'62 78
9: ;"$! -4 !'4$  4! +$$> 0?59.
  /!## "#$  . ) . ) .    $ # !%&'&()) 

          
,! 
0 *+  *+ 
 - . !$ ) .   
2
 * .
2
 !$
   1  !$  !"#$% -
'622278
9: ;5<!# 
9=2227 !
> -
'622278
9: ;"$! -4 !'4$  4! +$$> 0?59.
  /!## "#$  . ) . ) . 3$  *+ $ ,, 5 
  ,, 5    * # !

     
     in direct address (da) mode, the instruction provides the operand's 16-bit memory address. jump (jp) and call (call) instructions use this addressing mode to specify the 16-bit destination address that is loaded into the pc whenever a jp or call instruction is executed. the ldc and lde instructions can use direct address mode to specify the source or destination address for load operations to program memory (ldc) or to external data memory (lde), if implemented. "   
 # 3 ;/-02+7 % $' @
'      -02+7!   
 
 ;1 3 ;/-02+7 %  
  
  3  /  '        *
 1 <      )  * b5b  b-b 3.   4* 3"4 "    )  *   )  *# b5b c    )  * b-b c  )  * )  *   d d   4*      )  * 
+ ! ),  

    
        )  * 3.   4* )  *   d d   4* "   
 # 8 /84- % &'  84-
  -:


   33  "3e % &'   "3e
  -:


     
! )-./  

      
     in indirect address (ia) mode, the instruction specifies an address located in the lowest 256 bytes of the program memory. the selected pair of memory locations contains the actual address of the next instruction to be executed. only the call instruction can use the indirect address mode. because the indirect address mode assumes that the operand is located in the lowest 256 bytes of program memory, only an 8-bit address is supplied in the instruction; the upper bytes of the destination address are assumed to be all zeros.     
    )  * 3
  50;;    )  *   3.   4* d   4*   
 3"4 )  f  "   
 # 33 =+57 % $' -:
 @
     *   +57   +-7
 '  
    1 
  

    
     in relative address (ra) mode, a twos-complement signed displacement between ? 128 and + 127 is specified in the instruction. the displacement value is then added to the current pc value. the result is the address of the next instruction to be executed. before this addition occurs, the pc contains the address of the instruction immediately following the current instruction. several program control instructions use the relative address mode to perform conditional jumps. the instructions that support ra addressing are btjrf, btjrt, djnz, cpije, cpijne, and jr.     )  * 
      )  *   d "   
 # 8 d3$/gh"$ % &'  "$
  @
'   h-0i  -0    "
  
        
      
  0 

      
  in immediate (im) addressing mode, the operand value used in the instruction is the value supplied in the operand field itself. the operand may be one byte or one word in length, depending on the instruction used. immediate addressing mode is useful for loading constant values into registers. $'    @

'
 
 !  "   
 # 3 5/=57    )  *  
   
 

       
   control register descriptions are arranged in alphabetical order according to register mnemonic. more detailed information about control registers is presented in the context of the specific peripheral hardware descriptions in part ii of this manual. the locations and read/write characteristics of all mapped registers in the s3c8238/c8235/f8235 register file are listed in table 4-1. the hardware reset value for each mapped register is described in chapter 8, ?  and power-down." 
            lcd control register lcon 208 d0h r/w lcd mode register lmod 209 d1h r/w location d2h is not mapped. basic timer control register btcon 211 d3h r/w clock control register clkcon 222 d4h r/w system flags register flags 213 d5h r/w register pointer 0 rp0 214 d6h r/w register pointer 1 rp1 215 d7h r/w stack pointer (high byte) sph 216 d8h r/w stack pointer (low byte) spl 217 d9h r/w instruction pointer (high byte) iph 218 dah r/w instruction pointer (low byte) ipl 219 dbh r/w interrupt request register irq 220 dch r interrupt mask register imr 221 ddh r/w system mode register sym 222 deh r/w register page pointer pp 223 dfh r/w


      
    !         port 0 data register p0 224 e0h r/w port 1 data register p1 225 e1h r/w port 2 data register p2 226 e2h r/w port 3 data register p3 227 e3h r/w port 4 data register p4 228 e4h r/w port 0 interrupt control register p0int 229 e5h r/w port 0 interrupt pending register p0pnd 230 e6h r/w port 3 interrupt control register p3int 231 e7h r/w port 3 interrupt pending register p3pnd 232 e8h r/w timer a/timer 1 interrupt pending register tintpnd 233 e9h r/w timer a control register tacon 234 eah r/w timer a counter register tacnt 235 ebh r timer a data register tadata 236 ech r/w timer b control register tbcon 237 edh r/w timer b data register(high byte) tbdatah 238 eeh r/w timer b data register(low byte) tbdatal 239 efh r/w key strobe data register ksdata 240 f0h r voltage level detector control register vldcon 241 f1h r/w watch timer control register wtcon 242 f2h r/w oscillator control register osccon 243 f3h r/w stop control register stpcon 244 f4h r/w pattern generation control register pgcon 245 f5h r/w pattern generation data register pgdata 246 f6h r/w a/d converter control register adcon 247 f7h r/w a/d converter data register(high byte) addatah 248 f8h r/w a/d converter data register(low byte) addatal 249 f9h r/w ad interrupt register adint 250 fah r/w carrier on/off control register remcon 251 fbh r/w location fch is factory use only. basic timer counter data register btcnt 253 fdh r location feh is not mapped. interrupt priority register ipr 255 ffh r/w
 

     "
              port 0 control high register p0conh 224 e0h r/w port 0 control low register p0conl 225 e1h r/w location e1h is not mapped. port 1 pull-up control register p1pur 227 e3h r/w port 1 control high register p1conh 228 e4h r/w port 1 control low register p1conl 229 e5h r/w port 2 control high register p2conh 230 e6h r/w port 2 control low register p2conl 231 e7h r/w port 3 control register p3con 232 e8h r/w location e9h is not mapped. port 4 control register p4con 234 eah r/w key strobe control register kscon 235 ebh r/w locations ech-efh are not mapped. location f0h is factory use only. timer 1 control register t1con 241 f1h r/w timer 1 counter register(high byte) t1cnth 242 f2h r timer 1 counter register(low byte) t1cntl 243 f3h r timer 1 data register 1(high byte) t1data1h 244 f4h r/w timer 1 data register 1(low byte) t1data1l 245 f5h r/w timer 1 data register 2(high byte) t1data2h 246 f6h r/w timer 1 data register 2(low byte) t1data2l 247 f7h r/w timer 1 prescaler register t1ps 248 f8h r/w locations f9h-ffh are not mapped. 


      
  
         !    "#$ % &$#'#  reset () %*#$ "#$ +%% ,,#& -!% 
 
             !" reset #
  $  %&   #
 '()*  ()  +  "           #
  
     ,- #&   ' .     )   )  ' .    )      / ' .   
  * #
 ' .   
*  ' .    #  01+2'2" ' .     #  01+22" -)   )))     
)    
 
     %)
"    %     
   +  $ 01++/ (1++'  . %  %  %  %  %  '  '  #$
  % # 
 

      
  !"#   &' (
)
*
+

"


!  ,$ ? 0 0 0 0 0 0 0 '  ? r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
) not used for the s3c8238/c8235/f8235, always logic zero  
*
 -&%$ .     0 0 0 adc0  0 0 1 adc1  0 1 0 adc2  0 1 1 adc3  1 0 0 adc4  1 0 1 adc5  1 1 0 adc6  1 1 1 adc7 
" -/& $% 0   0 adc interrupt disable  1 adc interrupt enable 

 /  $     0 0 fxx/16  0 1 fxx/8  1 0 fxx/4  1 1 fxx 
!  0  0 disable operation  1 start operation 


     
 
$%
  !" #   &' (
)
*
+

"


!  ,$ ? ? ? ? ? ? ? 0 '  ? ? ? ? ? ? ? r/w -''' register addressing mode only 
)
 not used for the s3c8238/c8235/f8235  
! & $% .' 102/3  0 interrupt is not pending (when reading) clear pending bit (when writing)  1 interrupt is pending (when reading)
 

       !&'( )    &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)
  4'#$ /'1( 5   3  1 0 1 0 disable watchdog timer function  others enable watchdog timer function 
"
 &%$ /      0 0 fxx/4096   0 1 fxx/1024  1 0 fxx/128  1 1 not used 
 /$ /     0 no effect  1 clear the basic timer counter value 
! / #6$57'/ (    0 no effect 1 clear both clock frequency dividers
/   
     
 
    !" #  $   %  
 
      & 
    %  $# '
       !" #  $   %   
 
      ( #))   *# + , 
,-


          *(&" +    &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  ? ? ? r/w r/w ? ? ? -''' register addressing mode only 
)
+ not used for the s3c8238/c8235/f8235 (always logic zero)  

" /.8/ 1 5 / 3       0 0 fxx/16  0 1 fxx/8  1 0 fxx/2  1 1 fxx/1 (non-divided) 

! not used for the s3c8238/c8235/f8235 (always logic zero) 
/  .#    *+  /-  * #  *%    %% % 
 01(012 
 

   0     *(! ,    &' (
)
*
+

"


!  ,$ x x x x x x 0 0 '  r/w r/w r/w r/w r/w r/w r r/w -''' register addressing mode only
) /5#1/3 0 operation does not generate a carry or underflow condition 1 operation generates a carry-out or underflow into high-order bit 7
* 9#193 0 operation result is a non-zero value 1 operation result is zero
+ #1 3 0 operation generates a positive number (msb = "0") 1 operation generates a negative number (msb = "1")
 27(:#1,3 0 operation result is +127 or ?128 1 operation result is > +127 or < ?128
" -';$ #13 0 add operation completed 1 subtraction operation completed
 (/5#13 0 no carry-out of bit 3 or no underflow into bit 3 by addition or subtraction 1 addition generated carry-out of bit 3 or subtraction generated underflow into bit 3
 # & $%   $#1#& 3 0 interrupt return (iret) in progress (when read) 1 fast interrupt service routine in progress (when read)
!  -''  #1-3 0 bank 0 is selected 1 bank 1 is selected 


     .
  $%-!"     &' (
)
*
+

"


!  ,$ x x x x x x x x '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only
) & $% <7)1& =)30 >?5 & $%  0 disable (mask)  1 enable (un-mask) 
* & $% <7*1& =*30 >-& $%   0 disable (mask)  1 enable (un-mask) 
+ & $% <7+1& =+30 > 427(:  0 disable (mask)  1 enable (un-mask) 
 & $% <71& =30 >0 & $% .!
.!
)  0 disable (mask)  1 enable (un-mask) 
" & $% <7"1& ="30 >0 & $% .!
!.!
"  0 disable (mask)  1 enable (un-mask) 
 & $% <71& =30 >  4/% $27(:  0 disable (mask)  1 enable (un-mask) 
 & $% <7 1& = 30 >8'(:  0 disable (mask)  1 enable (un-mask) 
! & $% <7!1& =!30 >- 4/% $27(:  0 disable (mask)  1 enable (un-mask)
/   
% * 
% '
 
    $ 345
 

    
  $&./0 *1    
     &' (
)
*
+

"


!  ,$ x x x x x x x x '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)@
! & $ . -''145 3  the high-byte instruction pointer value is the upper eight bits of the 16-bit instruction pointer address (ip15?ip8). the lower byte of the ip address is located in the ipl register (dbh). 
  $&./ 2 *1      &' (
)
*
+

"


!  ,$ x x x x x x x x '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)@
! & $ . -''1<:5 3 the low-byte instruction pointer value is the lower eight bits of the 16-bit instruction pointer address (ip7?ip0). the upper byte of the ip address is located in the iph register (dah). 


     
  $%.*   !"#   &' (
)
*
+

"


!  ,$ x x x x x x x x '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)
'
 . 5/  (& $% a$%-'/ 0 0 0 group priority undefined 0 0 1 b > c > a 0 1 0 a > b > c 0 1 1 b > a > c 1 0 0 c > a > b 1 0 1 c > b > a 1 1 0 a > c > b 1 1 1 group priority undefined
* & $%  $$%/. 5/    0 irq6 > irq7  1 irq7 > irq6 
+ & $% a$%/. 5/    0 irq5 > (irq6, irq7)  1 (irq6, irq7) > irq5 
" & $%  $$%. 5/    0 irq3 > irq4  1 irq4 > irq3 
 & $% a$%. 5/    0 irq2 > (irq3, irq4)  1 (irq3, irq4) > irq2 
! & $% a$%-. 5/    0 irq0 > irq1  1 irq1 > irq0
 

    
  $%3$     &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r r r r r r r r -''' register addressing mode only 
) <7)1& =)3 6$ .' >?5 & $%   0 not pending  1 pending 
* <7*1& =*3 6$ .' >-& $%   0 not pending  1 pending 
+ <7+1& =+3 6$ .' > 427(:  0 not pending  1 pending 
 <71& =3 6$ .' >.!
.!
)0 & $%   0 not pending  1 pending 
" <7"1& ="3 6$ .' >.!
!.!
"0 & $%   0 not pending  1 pending 
 <71& =3 6$ .' >  4/% $27(:  0 not pending  1 pending 
 <7 1& = 3 6$ .' >8'(:  0 not pending  1 pending 
! <7!1& =!3 6$ .' >- 4/% $27(:  0 not pending  1 pending 


        4* 5    !"   &' (
)
*
+

"


!  ,$ 0 ? ? 0 0 0 0 0 '  r/w ? ? r/w r/w r/w r/w r/w -''' register addressing mode only 
) ?5 0    0 key strobe output disable  1 key strobe output enable 
*
+ not used for the s3c8238/c8235/f8235 
 $     0 45 sec (1.5 clock)  1 61 sec (2.0 clock) 
"
 & 7     0 0 1 msec (32 clock)  0 1 2 msec (64 clock)  1 0 3 msec (96 clock)  1 1 4 msec (128 clock) 

! ?5 2$ %$ .      0 0 p4.0-p4.3  0 1 p2.4-p2.7 and p4.0-p4.3  1 x p2.0-p2.7 and p4.0-p4.3
/  6)7 7   
 

        #    &' (
)
*
+

"


!  ,$ 0 0 0 ? 0 0 0 0 '  r/w r/w r/w ? r/w r/w r/w r/w -''' register addressing mode only 
)
+   (,      0 0 0 0.90 v  0 0 1 0.95 v  0 1 0 1.00 v  0 1 1 1.05 v  1 0 0 1.10 v  1 0 1 1.15 v  1 1 0 1.20 v  1 1 1 1.25 v 
 not used for the s3c8238/c8235/f8235  
"
 
! 

         -6     &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
) * +  "
 
! $ 5'     0 0 1/8 duty, 1/4 bias  0 1 1/4 duty, 1/3 bias  1 x static
 

       &! )  !"#   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  ? ? ? ? r/w r/w ? r/w -''' register addressing mode only 
)
 not used for the s3c8238/c8235/f8235  
"  5 2 /    0 main system oscillator run  1 main system oscillator stop 
 $ 5 2 /    0 sub system oscillator run  1 sub system oscillator stop 
 not used for the s3c8238/c8235/f8235  
! 5 /      0 main oscillator select  1 subsystem oscillator select


        .#/0 *1 #  !"   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)
* .!
) /-.&)  0 0 input mode; (both edge interrupt or t1cap input - rising start)  0 1 input mode, pull-up; (falling edge interrupt)  1 0 push-pull output  1 1 input mode (t1cap input - falling start) 
+@
 .!
* /?&*  0 0 input mode; (both edge interrupt or t1ck input)  0 1 input mode, pull-up; (falling edge interrup or t1ck input)  1 0 push-pull output  1 1 push-pull output 
"@
 .!
+ 28&+  0 0 input mode; (both edge interrupt)  0 1 input mode, pull-up; (falling edge interrupt)  1 0 push-pull output  1 1 alternative function; t1out 
@
! .!
.&  0 0 input mode; (both edge interrupt)  0 1 input mode, pull-up; (falling edge interrupt)  1 0 push-pull output  1 1 alternative function; tbpwm 
 

   0    .#/ 2 *1   !"   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)@
* .!
"&"  0 0 input mode; interrupt on rising edge  0 1 input mode, pull-up; interrupt on falling edge  1 0 input mode; interrupt on both edge  1 1 push-pull output 
+@
 .!
&  0 0 input mode; interrupt on rising edge  0 1 input mode, pull-up; interrupt on falling edge  1 0 input mode; interrupt on both edge  1 1 push-pull output 
"@
 .!
&  0 0 input mode; interrupt on rising edge  0 1 input mode, pull-up; interrupt on falling edge  1 0 input mode; interrupt on both edge  1 1 push-pull output 
@
! .!
!&!  0 0 input mode; interrupt on rising edge  0 1 input mode, pull-up; interrupt on falling edge  1 0 input mode; interrupt on both edge  1 1 push-pull output


     . 
  .#$% ,  !"#   &' (
)
*
+

"


!  value 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only
) .!
)0 & $% 1&)30  0 disable interrupt 1 enable interrupt
* .!
*0 & $% 1&*30  0 disable interrupt 1 enable interrupt
+ .!
+0 & $% 1&+30  0 disable interrupt 1 enable interrupt
 .!
0 & $% 1&30  0 disable interrupt 1 enable interrupt
" .!
"0 & $% 1&"30  0 disable interrupt 1 enable interrupt
 .!
0 & $% 1&30  0 disable interrupt 1 enable interrupt
 .!
0 & $% 1& 30  0 disable interrupt 1 enable interrupt
! .!
!0 & $% 1&!30  0 disable interrupt 1 enable interrupt 
 

       .#$%.6 7  !"#   &' (
)
*
+

"


!  value 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only
) .!
).)& $% .'  0 interrupt request is not pending, pending bit clear when write 0 1 interrupt request is pending
* .!
*.*& $% .'  0 interrupt request is not pending, pending bit clear when write 0 1 interrupt request is pending
+ .!
+.+& $% .'  0 interrupt request is not pending, pending bit clear when write 0 1 interrupt request is pending
 .!
.& $% .'  0 interrupt request is not pending, pending bit clear when write 0 1 interrupt request is pending
" .!
"."& $% .'  0 interrupt request is not pending, pending bit clear when write 0 1 interrupt request is pending
 .!
.& $% .'  0 interrupt request is not pending, pending bit clear when write 0 1 interrupt request is pending
 .!
. & $% .'  0 interrupt request is not pending, pending bit clear when write 0 1 interrupt request is pending
! .!
!.!& $% .'  0 interrupt request is not pending, pending bit clear when write 0 1 interrupt request is pending 


       ./0 *1 +  !"   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)
* .
).a"-)/2  0 0 input mode  0 1 ad7 converter input; normal input off  1 0 push-pull output (com4 output enable)  1 1 alternative function; pg3 output 
+
 .
*.a-*/2+  0 0 input mode  0 1 ad6 converter input; normal input off  1 0 push-pull output (com5 output enable)  1 1 alternative function; pg2 output 
"
 .
+.a -+/2*  0 0 input mode  0 1 ad5 converter input; normal input off  1 0 push-pull output (com6 output enable)  1 1 alternative function; pg1 output 

! .
.a!-/2)  0 0 input mode  0 1 ad4 converter input; normal input off  1 0 push-pull output (com7 output enable)  1 1 alternative function; pg0 output
/  
 
4 
 
  #%
8
%  
 
 

      ./ 2 *1 ,  !"   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)
* .
"-"  0 0 input mode  0 1 ad3 input; normal input off  1 0 push-pull output  1 1 open-drain output 
+
 .
-  0 0 input mode  0 1 ad2 input; normal input off  1 0 push-pull output  1 1 open-drain output 
"
 .
-  0 0 input mode  0 1 ad1 input; normal input off  1 0 push-pull output  1 1 open-drain output 

! .
!-!  0 0 input mode  0 1 ad0 input; normal input off  1 0 push-pull output  1 1 open-drain output
/  
 
4 
 
  #%
8
%  
 


         ..$ $% )  !"   &' (
)
*
+

"


!  value 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only
) .
).$$%  0  0 pull-up disable 1 pull-up enable
* .
*.$$%  0  0 pull-up disable 1 pull-up enable
+ .
+.$$%  0  0 pull-up disable 1 pull-up enable
 .
.$$%  0  0 pull-up disable 1 pull-up enable
" .
".$$%  0  0 pull-up disable 1 pull-up enable
 .
.$$%  0  0 pull-up disable 1 pull-up enable
 .
.$$%  0  0 pull-up disable 1 pull-up enable
! .
!.$$%  0  0 pull-up disable 1 pull-up enable
/  9
4 %
8
%    4   # $
  %
   %8  
%
 
 

       .8/0 *1 7  !"   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)@
* .
) 0a b?  c  0 0 input mode  0 1 input mode, pull-up  1 0 push-pull output (seg19/key strobe, kstr8 output enable)  1 1 open-drain output (seg19/key strobe, kstr8 output enable) 
+
 .
* 0a c?  )  0 0 input mode  0 1 input mode, pull-up  1 0 push-pull output (seg18/key strobe, kstr7 output enable)  1 1 open-drain output (seg18/key strobe, kstr7 output enable) 
"@
 .
+ 0a )?  *  0 0 input mode  0 1 input mode, pull-up  1 0 push-pull output (seg17/key strobe, kstr6 output enable)  1 1 open-drain output (seg17/key strobe, kstr6 output enable) 
@
! .
 0a *?  +  0 0 input mode  0 1 input mode, pull-up  1 0 push-pull output (seg16/key strobe, kstr5 output enable)  1 1 open-drain output (seg16/key strobe, kstr5 output enable) 


        .8/ 2 *1   !"  &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)
* .
" 0a +?    0 0 input mode  0 1 input mode, pull-up  1 0 push-pull output (seg15/key strobe, kstr4 output enable)  1 1 open-drain output (seg15/key strobe, kstr4 output enable) 
+
 .
 0a ?  "  0 0 input mode  0 1 input mode, pull-up  1 0 push-pull output (seg14/key strobe, kstr3 output enable)  1 1 open-drain output (seg14/key strobe, kstr3 output enable) 
"
 .
 0a "?    0 0 input mode  0 1 input mode, pull-up  1 0 push-pull output (seg13/key strobe, kstr2 output enable)  1 1 open-drain output (seg13/key strobe, kstr2 output enable) 

! .
! 0a ?    0 0 input mode  0 1 input mode, pull-up  1 0 push-pull output (seg12/key strobe, kstr1 output enable)  1 1 open-drain output (seg12/key strobe, kstr1 output enable)
 

       .) 9  !"   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)
* ."
"89?&"  0 0 inputmode; external interrupt  0 1 watch timer; buzzer output  1 0 push-pull output  1 1 alternative mode; kin3 input; only falling edge interrupt (when key strobe output is enable (kscon.7 = 1), port status is high- impedence during interval and pull-up during strobe out) 
+
 ."
-/-.?&  0 x inputmode; external interrupt (tacap input)  1 0 push-pull output  1 1 alternative mode; kin2 (when key strobe output is enable (kscon.7 = 1), port status is high- impedence during interval and pull-up during strobe out) 
"
 ."
-/??&   0 x inputmode; external interrupt (tacap input)  1 0 push-pull output  1 1 alternative mode; kin1 (when key strobe output is enable (kscon.7 = 1), port status is high- impedence during interval and pull-up during strobe out) 

! ."
!-.-28?&!  0 0 inputmode; external interrupt  0 1 tapwm or taout output  1 0 push-pull output  1 1 alternative mode; kin0 (when key strobe output is enable (kscon.7 = 1), port status is high- impedence during interval and pull-up during strobe out) 


      
 .)$%   !"#   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)
* ."
"?&"& $% 0     0 x interrupt disable  1 0 interrupt enable; falling edge  1 1 interrupt enable; rising edge 
+
 ."
?&& $% 0     0 x interrupt disable  1 0 interrupt enable; falling edge  1 1 interrupt enable; rising edge 
"
 ."
?& & $% 0     0 x interrupt disable  1 0 interrupt enable; falling edge  1 1 interrupt enable; rising edge 

! ."
!?&!& $% 0     0 x interrupt disable  1 0 interrupt enable; falling edge  1 1 interrupt enable; rising edge
/  
  
%  4(    $*8 %
+1" 8(-
      # $$ 
%
 

   0    .)$%.6 9  !"#   &' (
)
*
+

"


!  ,$ ? ? ? ? 0 0 0 0 '  ? ? ? ? r/w r/w r/w r/w -''' register addressing mode only 
)
 not used for the s3c8238/c8235/f8235  
" ."
"?&"& $% .'   0 interrupt request is not pending, pending bit clear when write 0  1 interrupt request is pending 
 ."
?&& $% .'   0 interrupt request is not pending, pending bit clear when write 0  1 interrupt request is pending 
 ."
?& & $% .'   0 interrupt request is not pending, pending bit clear when write 0  1 interrupt request is pending 
! ."
!?&!& $% .'   0 interrupt request is not pending, pending bit clear when write 0  1 interrupt request is pending
/  
  
%  4(    $*8 %
+1" 8(-
      # $$ 
%


     .  .+
   !"  &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)
* .
" 0a".a)?    0 0 input mode  0 1 input mode, pull-up  1 0 push-pull output (seg23/key strobe, kstr12 output enable)  1 1 alternative function; pg7 output 
+
 .
 0a.a*?    0 0 input mode  0 1 input mode, pull-up  1 0 push-pull output (seg22/key strobe, kstr11 output enable)  1 1 alternative function; pg6 output 
"
 .
 0a .a+?  !  0 0 input mode  0 1 input mode, pull-up  1 0 push-pull output (seg21/key strobe, kstr10 output enable)  1 1 alternative function; pg5 output 

! .
! 0a!.a?  b  0 0 input mode  0 1 input mode, pull-up  1 0 push-pull output (seg20/key strobe, kstr9 output enable)  1 1 alternative function; pg4 output
 

        .! ! ,  !"#   &' (
)
*
+

"


!  ,$ ? ? ? ? 0 0 0 0 '  ? ? ? ? r/w r/w r/w r/w -''' register addressing mode only 
)
 not used for the s3c8238/c8235/f8235  
"      0 no effect  1 s/w trigger start (auto clear) 
 .a2% 0     0 pg operation disable  1 pg operation enable 

! .a2% '     0 0 timer a match siganal triggering  0 1 timer b underflow siganal triggering  1 0 timer 1 match siganal triggering  1 1 s/w triggering mode 


        .!.     &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only
)
     .    0 0 0 0 destination: page 0 0 0 0 1 destination: page 1 0 0 1 0 destination: page 2
"
! $  .    0 0 0 0 source: page 0 0 0 0 1 source: page 1 0 0 1 0 source: page 2
/  ",(:&(:;:&(<;=:&(<        $  #   # $
 %$+4$ 8&-   %$ 8 
# $ %
%  $  # %$& 
# 0> $   $    %
%  $   
 

       .# 7    &' (
)
*
+

"


!  ,$ 1 1 0 0 0 ? ? ? '  r/w r/w r/w r/w r/w ? ? ? -''' register addressing only 
)
"  . !-'',$  register pointer 0 can independently point to one of the 256-byte working register areas in the register file. using the register pointers rp0 and rp1, you can select two 8-byte register slices at one time as active working register space. after a reset, rp0 points to address c0h in register set 1, selecting the 8-byte working register slice c0h?c7h. 

! not used for the s3c8238/c8235/f8235   .     &' (
)
*
+

"


!  ,$ 1 1 0 0 1 ? ? ? '  r/w r/w r/w r/w r/w ? ? ? -''' register addressing only 
)
"  .  -'',$  register pointer 1 can independently point to one of the 256-byte working register areas in the register file. using the register pointers rp0 and rp1, you can select two 8-byte register slices at one time as active working register space. after a reset, rp1 points to address c8h in register set 1, selecting the 8-byte working register slice c8h?cfh. 

! not used for the s3c8238/c8235/f8235 


         !&"./0 *1 9   &' (
)
*
+

"


!  ,$ x x x x x x x x '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)@
!  . -''145 3  the high-byte stack pointer value is the upper eight bits of the 16-bit stack pointer address (sp15?sp8). the lower byte of the stack pointer value is located in register spl (d9h). the sp value is undefined following a reset.     !&"./ 2 *1 :    &' (
)
*
+

"


!  ,$ x x x x x x x x '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)@
!  . -''1<:5 3  the low-byte stack pointer value is the lower eight bits of the 16-bit stack pointer address (sp7?sp0). the upper byte of the stack pointer value is located in register sph (d8h). the sp value is undefined following a reset. 
 

        % +  !"#   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only
)@
! 2./   1 0 1 0 0 1 0 1 enable stop instruction other values disable stop instruction
/  # )
 $,4 
 9

 ,4 $      ,4   
   )



         *(-6     &' (
)
*
+

"


!  ,$ 0 ? ? x x x 0 0 '  r/w ? ? ? ? ? ? r/w -''' register addressing mode only 
) not used, always logic zero  
*
 not used for the s3c8238/c8235/f8235 
! a& $% 0     0 disable global interrupt processing  1 enable global interrupt processing
/ =  $ 

$  
%%  $)
 $?" 
 +   $  ,9@ - 
 

       '(    !"   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)
+  &%$ /      0 0 0 fxx/1  0 0 1 fxx/8  0 1 0 fxx/64  0 1 1 t1ck  1 0 x tbuf  1 1 x counter stop 

"  2% '     0 0 interval mode  0 1 capture mode (capture on falling edge, ovf can occur)  1 0 capture mode (capture on rising edge, ovf can occur)  1 1 capture mode (capture on both edge, ovf can occur) 
  /$ 0   0 no effect  1 clear the timer 1 counter (auto-clear bit) 
   4/% $& $% 0   0 disable interrupt  1 enable interrupt 
!  27(:& $% 0  0 disable overflow interrupt  1 enable overflow interrupt


         '(
 
  !"#   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 ? '  r/w r/w r/w r/w r/w r/w r/w ? -''' register addressing mode only 
)
* -&%$ /      0 0 fxx/1024  0 1 fxx/256  1 0 fxx/64  1 1 external clock (tack) 
+
 -2% '     0 0 internal mode (taout mode)  0 1 capture mode (capture on rising edge, counter running, ovf can occur)  1 0 capture mode (capture on falling edge, counter running, ovf can occur)  1 1 pwm mode (ovf interrupt can occur) 
" -/$ /   0 no effect  1 clear the timer a counter (after clearing, return to zero) 
 -27(:& $% 0   0 disable overflow interrupt  1 enable overflow interrupt 
 - 4/% $& $% 0   0 disable interrupt  1 enable interrupt 
! not used for the s3c8238/c8235/f8235  
 

   0    '(    !"#   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)@
* &%$ /      0 0 fxx  0 1 fxx/2  1 0 fxx/4  1 1 fxx/8 
+@
 & $%      0 0 elapsed time for low data value  0 1 elapsed time for high data value  1 0 elapsed time for low and high data values  1 1 invalid setting 
" & $% 0   0 disable interrupt  1 enable interrupt 
    %   0 stop timer b  1 start timer b 
 '     0 one-shot mode  1 repeating mode 
! 2$ %$ (%(%/    0 t-ff is low  1 t-ff is high
/  #))  *# 


     . 
  '(
$%.6 :  !"#   &' (
)
*
+

"


!  ,$ ? ? ? ? 0 0 0 0 '  ? ? ? ? r/w r/w r/w r/w -''' register addressing mode only 
)
 not used for the s3c8238/c8235/f8235  
"  27(:& $% .'   0 no interrupt pending  0 clear pending bit when write  1 interrupt pending 
   4/% $& $% .'   0 no interrupt pending  0 clear pending bit when write  1 interrupt pending 
 -27(:& $% .'   0 no interrupt pending  0 clear pending bit when write  1 interrupt pending 
! - 4/% $& $% .'   0 no interrupt pending  0 clear pending bit when write  1 interrupt pending
 

        ! &   !"#   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  ? ? ? r/w r r/w r/w r/w -''' register addressing mode only 
)
 not used for the s3c8238/c8235/f8235  
" ,<<7    0 v is higher than reference voltage  1 v is lower than reference voltage 
 ,<2% 0  0 operation off  1 operation on 

! (,      0 0 v
= 2.4 v  0 1 v
= 2.7 v  1 0 v
= 3.3 v  1 1 v
= 4.5 v


        !&0'( 8  !"#   &' (
)
*
+

"


!  ,$ 0 0 0 0 0 0 0 0 '  r/w r/w r/w r/w r/w r/w r/w r/w -''' register addressing mode only 
)  4/      0 main system clock divided by 2  (fxx/128)  1 sub system clock (fxt)  
*  4& $% 0   0 disable watch timer interrupt  1 enable watch timer interrupt 
+@
 $dd      0 0 0.5 khz buzzer (buz) signal output  0 1 1 khz buzzer (buz) signal output   1 0 2 khz buzzer (buz) signal output  1 1 4 khz buzzer (buz) signal output 
"@
  4 %'     0 0 1.0 s interval  0 1 0.5 s interval  1 0 0.25 s interval  1 1 3.91 ms interval
  40   0 disable watch timer; clear frequency dividing circuits  1 enable watch timer 
!  4& $% .'   0 interrupt is not pending, clear pending bit when write  1 interrupt is pending 

         
  the s3c8-series interrupt structure has three basic components: levels, vectors, and sources. the sam8 cpu recognizes up to eight interrupt levels and supports up to 128 interrupt vectors. when a specific interrupt level has more than one vector address, the vector priorities are established in hardware. a vector address can be assigned to one or more sources.  interrupt levels are the main unit for interrupt priority assignment and recognition. all peripherals and i/o blocks can issue interrupt requests. in other words, peripheral and i/o operations are interrupt-driven. there are eight possible interrupt levels: irq0?irq7, also called level 0?level 7. each interrupt level directly corresponds to an interrupt request number (irqn). the total number of interrupt levels used in the interrupt structure varies from device to device. the s3c8238/c8235/f8235 interrupt structure recognizes eight interrupt levels. the interrupt level numbers 0 through 7 do not necessarily indicate the relative priority of the levels. they are just identifiers for the interrupt levels that are recognized by the cpu. the relative priority of different interrupt levels is determined by settings in the interrupt priority register, ipr. interrupt group and subgroup logic controlled by ipr settings lets you define more complex priority relationships between different levels. 
 each interrupt level can have one or more interrupt vectors, or it may have no vector address assigned at all. the maximum number of vectors that can be supported for a given level is 128 (the actual number of vectors used for s3c8-series devices is always much smaller). if an interrupt level has more than one vector address, the vector priorities are set in hardware. s3c8238/c8235/f8235 uses sixteen vectors.
 a source is any peripheral that generates an interrupt. a source can be an external pin or a counter overflow. each vector can have several interrupt sources. in the s3c8238/c8235/f8235 interrupt structure, there are sixteen possible interrupt sources. when a service routine starts, the respective pending bit should be either cleared automatically by hardware or cleared "manually" by program software. the characteristics of the source's pending mechanism determine which method would be used to clear its respective pending bit.

        the three components of the s3c8 interrupt structure described before ? levels, vectors, and sources ? are combined to determine the interrupt structure of an individual device and to make full use of its available interrupt logic. there are three possible combinations of interrupt structure components, called interrupt types 1, 2, and 3. the types differ in the number of vectors and interrupt sources assigned to each level (see figure 5-1): type 1: one level (irqn) + one vector (v  ) + one source (s  ) type 2: one level (irqn) + one vector (v  ) + multiple sources (s  ? s  ) type 3: one level (irqn) + multiple vectors (v  ? v  ) + multiple sources (s  ? s   , s   ? s  ) in the s3c8238/c8235/f8235 microcontroller, two interrupt types are implemented.                           

  

 

!  

 






 


   !  "!#  "
  $

%




       ! "!

      #$#$#  the s3c8238/c8235/f8235 microcontroller supports sixteen interrupt sources. all sixteen of the interrupt sources have a corresponding interrupt vector address. eight interrupt levels are recognized by the cpu in this device- specific interrupt structure, as shown in figure 5-2. when multiple interrupt levels are active, the interrupt priority register (ipr) determines the order in which contending interrupts are to be serviced. if multiple interrupts occur within the same interrupt level, the interrupt with the lowest vector address is usually processed first (the relative priorities of multiple interrupts within a single level are fixed in hardware). when the cpu grants an interrupt request, interrupt processing starts. all other interrupts are disabled and the program counter value and status flags are pushed to stack. the starting address of the service routine is fetched from the appropriate vector address (plus the next 8-bit value to concatenate the full 16-bit address) and the service routine is executed.

     "    #$% !  
&

'

$

(
)


'
%
#
 $
*+,

'
%

+-,
(


-


(
)





)% 
+


''
%

'

'
'$
'


)'
)
'
'   

)!)  

(  
.
( +,  ,!&  
/
)!) -  
/
( ,!&$
!& ,!&$
!& ,!&$
!& ,!&$
!& +0, +1, *+, +-, + , +/, +, ++,  2- -

 2- 

 2- 

 2-

 !& !& !& !& #-, #, #0, #1, 0 2- 0

 2- "

 2- 1

 2- 3

 !& !& !& !& &)
 
( # , " !& /*
 #/, 1 4%

 #+, 3 !& ,!&$
!&  # #$#$#  !   

      %&''   all interrupt vector addresses for the s3c8238/c8235/f8235 interrupt structure are stored in the vector address area of the internal 32-kbyte rom, 0h?7fffh (see figure 5-3). you can allocate unused locations in the vector address area as normal program memory. if you do so, please be careful not to overwrite any of the stored vector addresses (table 5-1 lists all vector addresses). the program reset address in the rom is 0100h. 1$ 0 - 5*) 6 "" --, --, ##, ###, 5,+76 reset /  )
/ / ###, $8
 2'
9 % 5:96
/ 1;4% ;4%  %(
&)) & *

     & *+  ! 
 
&))    ! 
 ,    $*  '-* *  ./ *     !    
 "   .$0 $0 254 feh key strobe interrupt irq7 ? 250 fah ad interrupt irq6 ? 248 f8h watch tiner overflow irq5 ? 246 f6h p0.7 external interrupt irq4 3 244 f4h p0.6 external interrupt 2 242 f2h p0.5 external interrupt 1 240 f0h p0.4 external interrupt 0 238 eeh p0.3 external interrupt irq3 3 236 ech p0.2 external interrupt 2 234 eah p0.1 external interrupt 1 232 e8h p0.0 external interrupt 0 230 e6h timer 1 overflow irq2 1 228 e4h timer 1 match/capture 0 226 e2h timer b underflow irq1 ? 220 e0h timer a overflow irq0 1 218 deh timer a match/capture 0 !   

              
             
      
       
         
          

    '  &1$' &1 % 23'4 executing the enable interrupts (ei) instruction globally enables the interrupt structure. all interrupts are then serviced as they occur according to the established priorities. % the system initialization routine executed after a reset must always contain an ei instruction to globally enable the interrupt structure. during the normal operation, you can execute the di (disable interrupt) instruction at any time to globally disable interrupt processing. the ei and di instructions change the value of bit 0 in the sym register.  (%%5   in addition to the control registers for specific interrupt sources, four system-level registers control interrupt processing: ? the interrupt mask register, imr, enables (un-masks) or disables (masks) interrupt levels. ? the interrupt priority register, ipr, controls the relative priorities of interrupt levels. ? the interrupt request register, irq, contains interrupt pending flags for each interrupt level (as opposed to each interrupt source). ? the system mode register, sym, enables or disables global interrupt processing (sym settings also enable fast interrupts and control the activity of external interface, if implemented). *+#  ! 

  % 6 

   ' $0   
' ! 
 interrupt mask register imr r/w bit settings in the imr register enable or disable interrupt processing for each of the eight interrupt levels: irq0?irq7. interrupt priority register ipr r/w controls the relative processing priorities of the interrupt levels. the seven levels of s3c8238/c8235/f8235 are organized into three groups: a, b, and c. group a is irq0 and irq1, group b is irq2, irq3 and irq4, and group c is irq5, irq6, and irq7. interrupt request register irq r this register contains a request pending bit for each interrupt level. system mode register sym r/w this register enables/disables fast interrupt processing, dynamic global interrupt processing, and external interface control (an external memory interface is implemented in the s3c8238/c8235/f8235 microcontroller). !   !"     
  # #   $ %      

      % 5%%%  interrupt processing can therefore be controlled in two ways: globally or by specific interrupt level and source. the system-level control points in the interrupt structure are: ? global interrupt enable and disable (by ei and di instructions or by direct manipulation of sym.0 ) ? interrupt level enable/disable settings (imr register) ? interrupt level priority settings (ipr register) ? interrupt source enable/disable settings in the corresponding peripheral control registers % when writing an application program that handles interrupt processing, be sure to include the necessary register file address (register pointer) information. 
<
' 5;%6 -;3$  
9= ' 2' %) 
2% ' >

 5+$
*

?9 - 6    reset + )  %)  7  !   
'* *-

    (  .&%%5   for each interrupt source there is one or more corresponding peripheral control registers that let you control the interrupt generated by the related peripheral (see table 5-3). *+  ! 


* )'* *     ! 
   !    24 
* 
24    timer a overflow irq0 tintpnd e9h, bank 0 timer a match/capture tacon eah, bank 0 tacnt ebh, bank 0 tadata ech, bank 0 timer b underflow irq1 tbcon edh, bank 0 tbdatah, tbdatal eeh, efh, bank 0 timer 1 overflow irq2 tintpnd e9h, bank 0 timer 1 match/capture t1con f1h, bank 1 t1cnth f2h, bank 1 t1cntl f3h, bank 1 t1data1h f4h, bank 1 t1data1l f5h, bank 1 t1data2h f6h, bank 1 t1data2l f7h, bank 1 t1ps f8h, bank 1 p0.3 external interrupt irq3 p0conl e1h, bank 1 p0.2 external interrupt p0int e5h, bank 0 p0.1 external interrupt p0pnd e6h, bank 0 p0.0 external interrupt p0.7 external interrupt irq4 p0conh e0h, bank 1 p0.6 external interrupt p0int e5h, bank 0 p0.5 external interrupt p0pnd e6h, bank 0 p0.4 external interrupt watch timer overflow irq5 wtcon f2h, bank 0 ad interrupt irq6 adcon f7h, bank 0 addatah f8h, bank 0 addatal f9h, bank 0 adint fah, bank 0 p1conh e4h, bank 1 p1conl e5h, bank 1 key strobe interrupt irq7 kscon ebh, bank 1 ksdata f0h, bank 0

     )  ((%'5 2 (4 the system mode register, sym (set 1, deh), is used to globally enable and disable interrupt processing (see figure 5-5). a reset clears sym.0 to "0". the instructions ei and di enable and disable global interrupt processing, respectively, by modifying the bit 0 value of the sym register. in order to enable interrupt processing an enable interrupt (ei) instruction must be included in the initialization routine, which follows a reset operation. although you can manipulate sym.0 directly to enable and disable interrupts during the normal operation, it is recommended to use the ei and di instructions for this purpose. %
9
'
5?96 *+,
$
$
!& @. 9. 3 1 " 0   - a
 >


b -
c
*
'

)' 
c
+
'

)'   " -(
)  2 (4

      (& 85 2(4 the interrupt mask register, imr (set 1, ddh) is used to enable or disable interrupt processing for individual interrupt levels. after a reset, all imr bit values are undetermined and must therefore be written to their required settings by the initialization routine. each imr bit corresponds to a specific interrupt level: bit 1 to irq1, bit 2 to irq2, and so on. when the imr bit of an interrupt level is cleared to "0", interrupt processing for that level is disabled (masked). when you set a level's imr bit to "1", interrupt processing for the level is enabled (not masked). the imr register is mapped to register location ddh in set 1. bit values can be read and written by instructions using the register addressing mode. 
9=
'
596 **,
$
$
!& @. 9. 3 1 " 0   - - 

d

 -
c
*
d
 
c
+
d
    0 " 1 3  9  ! (*:  2(4 

      %5 24 the interrupt priority register, ipr (set 1, bank 0, ffh), is used to set the relative priorities of the interrupt levels in the microcontroller?s interrupt structure. after a reset, all ipr bit values are undetermined and must therefore be written to their required settings by the initialization routine. when more than one interrupt sources are active, the source with the highest priority level is serviced first. if two sources belong to the same interrupt level, the source with the lower vector address usually has the priority (this priority is fixed in hardware). to support programming of the relative interrupt level priorities, they are organized into groups and subgroups by the interrupt logic. please note that these groups (and subgroups) are used only by ipr logic for the ipr register priority definitions (see figure 5-7): group a irq0, irq1 group b irq2, irq3, irq3 group c irq5, irq6, irq7 2 >
.  . 0 .  . . 2 >
/  / - / 2 >
  3  1   "  ;  ! ,   
 "5
! as you can see in figure 5-8, ipr.7, ipr.4, and ipr.1 control the relative priority of interrupt groups a, b, and c. for example, the setting "001b" for these bits would select the group relationship b > c > a. the setting "101b" would select the relationship c > b > a. the functions of the other ipr bit settings are as follows: ? ipr.5 controls the relative priorities of group c interrupts. ? interrupt group c includes a subgroup that has an additional priority relationship among the interrupt levels 5, 6, and 7. ipr.6 defines the subgroup c relationship. ipr.5 controls the interrupt group c. ? ipr.0 controls the relative priority setting of irq0 and irq1 interrupts.

      >
/ -
c
-
e
 
c

e
- '
. -
c

e
0 
c
0
e
 >
 -
c
"
e
51$
36 
c
51$
36
e
" '
 -
c
1
e
3 
c
3
e
1 >
. -
c

e
5 $
06 
c
5 $
06
e
 
2%
'
526 #+,
$
$
.=
-$
!& @. 9. 3 1 " 0   - >
%b -
-
-
c
f -
-

c
.
e

e
/ -

-
c
/
e
.
e -


c
.
e
/
e
 
-
-
c

e
/
e
. 
-

c

e
.
e
/ 

-
c
/
e

e
. 


c
f *3 *0 *    !  
 "  24

     " < 5 2<4 you can poll bit values in the interrupt request register, irq (set 1, dch), to monitor interrupt request status for all levels in the microcontroller?s interrupt structure. each bit corresponds to the interrupt level of the same number: bit 0 to irq0, bit 1 to irq1, and so on. a "0" indicates that no interrupt request is currently being issued for that level. a "1" indicates that an interrupt request has been generated for that level. irq bit values are read-only addressable using register addressing mode. you can read (test) the contents of the irq register at any time using bit or byte addressing to determine the current interrupt request status of specific interrupt levels. after a reset, all irq status bits are cleared to ?0?. you can poll irq register values even if a di instruction has been executed (that is, if global interrupt processing is disabled). if an interrupt occurs while the interrupt structure is disabled, the cpu will not service it. you can, however, still detect the interrupt request by polling the irq register. in this way, you can determine which events occurred while the interrupt structure was globally disabled. 
<
'
56 *,
$
$
 @. 9. 3 1 " 0   - - 

d
<
'
 -
c
d



' 
c
d


'    0 " 1 3  =  ! ,    2<4

      '5%  % 6 there are two types of interrupt pending bits: one type is automatically cleared by hardware after the interrupt service routine is acknowledged and executed; the other must be cleared in the interrupt service routine by software.  ) 1 * )&
-* *"+".* )6*  for interrupt pending bits that are cleared automatically by hardware, interrupt logic sets the corresponding pending bit to "1" when a request occurs. it then issues an irq pulse to inform the cpu that an interrupt is waiting to be serviced. the cpu acknowledges the interrupt source by sending an iack, executes the service routine, and clears the pending bit to "0". this type of pending bit is not mapped and cannot, therefore, be read or written by application software. in the s3c8238/c8235/f8235 interrupt structure, the timer b underflow interrupt (irq1) belongs to this category of interrupts in which pending condition is cleared automatically by hardware.  ) 1 * )+" >  
  the second type of pending bit is the one that should be cleared by program software. the service routine must clear the appropriate pending bit before a return-from-interrupt subroutine (iret) occurs. to do this, a "0" must be written to the corresponding pending bit location in the source?s mode or control register. in the s3c8238/c8235/f8235 interrupt structure, pending conditions for irq3, irq4 and irq7 must be cleared in the interrupt service routine.

     &  %%5 < the interrupt request polling and servicing sequence is as follows: 1. a source generates an interrupt request by setting the interrupt request bit to "1". 2. the cpu polling procedure identifies a pending condition for that source. 3. the cpu checks the source's interrupt level. 4. the cpu generates an interrupt acknowledge signal. 5. interrupt logic determines the interrupt's vector address. 6. the service routine starts and the source's pending bit is cleared to "0" (by hardware or by software). 7. the cpu continues polling for interrupt requests.  %  before an interrupt request is serviced, the following conditions must be met: ? interrupt processing must be globally enabled (ei, sym.0 = "1") ? the interrupt level must be enabled (imr register) ? the interrupt level must have the highest priority if more than one levels are currently requesting service ? the interrupt must be enabled at the interrupt's source (peripheral control register) when all the above conditions are met, the interrupt request is acknowledged at the end of the instruction cycle. the cpu then initiates an interrupt machine cycle that completes the following processing sequence: 1. reset (clear to "0") the interrupt enable bit in the sym register (sym.0) to disable all subsequent interrupts. 2. save the program counter (pc) and status flags to the system stack. 3. branch to the interrupt vector to fetch the address of the service routine. 4. pass control to the interrupt service routine. when the interrupt service routine is completed, the cpu issues an interrupt return (iret). the iret restores the pc and status flags, setting sym.0 to "1". it allows the cpu to process the next interrupt request.

    '  5&5%&''   the interrupt vector area in the rom (00h?ffh) contains the addresses of interrupt service routines that correspond to each level in the interrupt structure. vectored interrupt processing follows this sequence: 1. push the program counter's low-byte value to the stack. 2. push the program counter's high-byte value to the stack. 3. push the flag register values to the stack. 4. fetch the service routine's high-byte address from the vector location. 5. fetch the service routine's low-byte address from the vector location. 6. branch to the service routine specified by the concatenated 16-bit vector address. % a 16-bit vector address always begins at an even-numbered rom address within the range of 00h?ffh.  5%%'  it is possible to nest a higher-priority interrupt request while a lower-priority request is being serviced. to do this, you must follow these steps: 1. push the current 8-bit interrupt mask register (imr) value to the stack (push imr). 2. load the imr register with a new mask value that enables only the higher priority interrupt. 3. execute an ei instruction to enable interrupt processing (a higher priority interrupt will be processed if it occurs). 4. when the lower-priority interrupt service routine ends, restore the imr to its original value by returning the previous mask value from the stack (pop imr). 5. execute an iret. depending on the application, you may be able to simplify the procedure above to some extent.

       


 
       
  
     
               
   

   
  
  
  
          ! 

 "  #   $%&
 '$%&  %         (  ) *
 
   '+)(     ,-' (     ./
   ! !     01       !!+)!  +   !  !  !+ 
   2! 2  '  ( 
  
   "
  !  23455 6   7     0    
  
,-!,-       .   
   !      4!8    8  
    "/    9 '9(!$  9 '$9(!$/':(!)  ') (!9" '9 (!$'$;(!$  '$ (.       !       !8  ; 8

 
     
 !   "   #"   <9    <) !  <  <)+ !  <  <)= !  < /   <) !  <     <)=) !  < /    <)) !  <      <)=$ !  < /    <)$ !  <      <)=0) !  < /     <)0) !  <       <)=0$ !  < /     <)0$ !  <       <)> !  <   0&0  0   7 0&01) !  0 
  7' ( 0&01$ !  0 
  7' ( 01?   0
  7 01?1) !  0

  7' ( 01?1$ !  0

  7' (   
     
 
  
   
  

 
     
 !$%"&   "   '   ) !     )) !   0 !      )   ) *
 )=  )  )=>  )   )$@ !  )" $#  $  $#>  $   ;1< !  ;
  + !  
     1+ !  
    #(   #) !  <   #) &;     &9 !  <  &9 :&9 !  <  / 
"&9 

 
     
 !$%"&   "   ( %  +a9. !  +*
  "  +a9 !  +*
  " 
  <<   
 0$a= !     ! *
  b
 0$a#= !     ! *
   b
 )a#c ! )   *
   d  =#=9  =  =:$  =/ $9=  $
 
 a0 ! a
      a0  a
 
   a9 ! a
  "     #=:  #/ 9=  9
 >.$  > 
  )   + #) !  + #) +0 !  +    +$  +   +$9  +  +$  + +&9 !  +&9 +:&9 !  +:&9 ; !    
 7 ; !  
 7 

 
     
 !$%""&   "   "'*  9<  9  9<  9 
   99  9   99  9  
   9       > 0     %+%  .       )$  )
 =$  =
 $)<=  = $  #&0  #     9.  9   +2  72 +,  7, .     90        902       2 90,       , &0  =    

 
    ,#
 
 $,#
&   .< e   

 01   .
  !.< e3.< e6! 
  *
 
    !.< e .< e4! 
 +)   .< e      
 
 '.< e,(7  
'.< e2(     72 7,
  .< e     
  
    !
!<  
 <    
 
! #)!&9!:&9! ))!1+  .  . / ! #)
 
c !&"   
   #)
 $ #)
 
.   !  


 .   

   
 
           ! "  # 
$%
&& 
'(
 
 $') 
'(
 
(*+
(
 + 

&,'(
 -
(
- ./(
.  $(
 01( /2(
3  ,(! ,( ($,#
&

 
    ,#
%      %!,($,#
-&  8,8 
         
       ';+(      "   ! "
 
     0  
  !  !        .,($,#
& .        !c 8,8 
    d $     !    !c 8,8 
   d    (,($,#
/&  .    !  ! !    ! ;+  
   d   "
     "
    0*1,($,#
2&  @ 8,8 
  f       g,4  3,4$   828             "3,($,#
4&  ) 
     
 /

+)     
b
 *
    /
  )  

    !        5*%!,($,#
6 (  ? 8,8"     
 ! 
    
 6$
)  *
') (
   "   
  "
   
       '+)( 
?           , ,($,#
&  .$

   
$9=  
 " > !
 

 
 /
$9=
  /

 )7"",($,#
8&  +     7,     
 ! 72 7,+    828' 72(+2
 /
  8,8' 7,(+,
 /


 
     +%      6,( %0 ,(     c c    @ &"   ) ) *
 ? ?   2     d  ,      h           3 @

  / @

 4 !  !    )      
   i $      / 0 0  
  $0 $
    .< e .  ')5?( 90 9    j $       / ? ?/ 
 
/ ) ) 
 
/ + + 
 
/  &  

 
    2  %0   " (          --  > 7    9'k23,5(  +'(  7   9'k23,5!k23( 2 +2'<+(  7   9'k23,5(  > 7     99 ' k2!4!6!!,6( 9 9   7    9' k23455!k23,5( 9 +88     7   ' k23455!k23( 99 9     7      99 ' k23456!"
  !   k2!4!!,6( $  $      ' k23456!"
  ( $  $   7    i9'k23,5( $9 $        7   i9 i ' k23455!k23,5( $  $   7      i99 ' k2!4!!,6( $99 $          7     i99  i ' k23456!" !   k2!4!!,6( : $/   j l9m' k23455!k23,5( : $/'  (   j l99 m' k 3,4 g,4!   k2!4!!,6( :< $/'  (   j l99 m' k 23-555!  k4!!,6( )  )      ' k 23-555( 9  9"    ' k
  g,4 3,4  "   /
 ( $; $   j'k23455( $;< $' (   j'k23-555( 

 
    /%97 * %   #:  ))#$5;&   3 2 , 4  6 5 -  1 2 )= 9, )= $9, )) ,! 4 )) ,!$ 4 )) 94!9, )) $94!9, )) 9,!$; +&9 239 0 , 9< 9, 9< $9, ) ,! 4 ) ,!$ 4 ) 94!9, ) $94!9, ) 9,!$; +0 ,!94 0 4 $# 9, $# $9, 1+ ,! 4 1+ ,!$ 4 1+ 94!9, 1+ $94!9, 1+ 9,!$; +:&9 239 =  a0 $99, 90%2%, $; + ,! 4 + ,!$ 4 + 94!9, + $94!9, + 9,!$; +a9 4!9  9 6 )  9, )  $9, &9 ,! 4 &9 ,!$ 4 &9 94!9, &9 $94!9, &9 9,!$; <)+ 239 5 0&0 9, 0&0 $9, #) ,! 4 #) ,!$ 4 #) 94!9, #) $94!9, #) 9,!$; +$ , # - &; 9, &; $9, ; ,! 4 ; ,!$ 4 ; 94!9, ; $94!9, ; 9,!$; + #) 239 $  01? 94 01? $94 ; ,! 4 ; ,!$ 4 ; 94!9, ; $94!9, ; 9,!$; +$ , +  )=> 99, )=> $9, 01?1) $9,!94 01?1$ $9,!94 ;1< 94!99, ;1< $94!99, ;1< $;!99, <) ,!/! 4 + n 9< 9, 9< $9, 0&01) $94!9, 0&01$ $94!9, )$@ 94!99, )$@ $94!99, )$@ $;!99, <) 4!/! , <  $#> 99, $#> $9, 0 ,! 4 0 ,!$ 4 0 94!9, 0 $94!9, 0 9,!$; <) ,!$ 4!/< = + <9 9, <9 $9, :&9 ,! 4 :&9 ,!$ 4 :&9 94!9, :&9 $94!9, :&9 9,!$; <) 4!$ 4!/<   99 9, 99 $9, 0$a= $ ! 4!9  <) ,!$ 4 <)> 994!99, <)> $94!99, <)> 99,!$;< <) ,!$ 4 ? ) 9  9, 9  $9, 0$a#= $ ! 4!9  <) 4!$ ,  << $ , <) $9,!$; <) $ ,! 4 = = 99 9, 99 $9, <)) ,!$ 4 <)$ ,!$ 4 <) 94!9, <) 94!$9, <) 9,!$; <) ,!$ 4!/ : . > 0 9, > 0 $9, <)0) 4!$ , <)0$ 4!$ ,  << $99, <) $94!9,  << ) , <) 4!$ ,!/ 

 
    /%97 *$%"& %   #:  ))#$5;&  3  n  +  ) = . 1 2 <) ,!94 <) 4!9, )a#c ,!9  a9 !9  <) ,!$; a0 !)  $# , #=: 0 ,        =#=9  04=:$  =>.$  96+2  5+,  #-$)<=  $         &0  +)$  +n=$  < 9=  =+$9=  9.  ? )        .  ==.  : . <) ,!94 <) 4!9, )a#c ,!9  a9 !9  <) ,!$; a0 !)  $# , #&0  

 
    %    %     *
  6    ' (  
      /
*
 . / !  *
     8b
8         *
     b
    --   '(!d 'c(!'(! "  '@( 
         *
  
  %"%" )!    ,( 2222 .  3 ,222  
 3 2,,,      k, ,,,,   # #    k2 2,,2   c c  ck, ,,,2   #c # d  ck2 ,,2, 0< 0
 k2 2,2, ;$ ;
 k, 2,22 &@ &"   @k, ,,22 #&@ #  "   @k2 2,,2   =o =b
 ck, ,,,2   #= # b
 ck2 ,22, e= e   b
 ':&9@(k2 222, < < ':&9@(k, ,2,2 e e   'c&9':&9@((k2 22,2 <= < b
 'c&9':&9@((k, ,,,,   1e= 1   b
 k2 2,,,   1< 1 k, ,2,, 1e 1   'k2 #)ck2(k, 22,, 1<= 1 b
 '&9c(k,      
 
 
    
  
           !"  #$ %
&    ' !(%)      *   %
$  
  "  !+   
$        & , "$   ! ! 
    $  
 
 -.-/-./
-  


 
     +%  %           /   
   
 $       "  b
 7         
 
      $
 '  (  .

   
%   
         
 f     /
    
 f   . 
   )    
 f !/
 !  '(  0  / '(/   

  

 
     
  % !  <   g g  
  !   !     
    
 
  f       $
      !
   "
                   ,(<   %<         
p      .<  
828p      <  
"p      =<    "  
!!          
  p      <     828 5<           
  
p      , <    )! %! " $5>& "" " "     q     4 6 ,4          - ,            - ,6 9 9  ,59$9         - ,- 9 $;  > < e" 9,k,2?!94k2?!k8,8!  2,?k42?!  24?k2?!   2?k2 ?  ) 9,!94  9,k,6?!94k2?  ) 9,!i94  9,k,+?!94k2?  ) 2,?!24?  9 2,?k46?!  24?k2?  ) 2,?!i24?  9 2,?k4+?!  24?k2?  ) 2,?!j,,?  9 2,?k4? $ /  !   9, "
,2?!   8,8  
 7  94 "
2?8 )9,!948 2?   "
'8,8(  "
,2?!",6?  9,

 
     
  !  <   g  
      
     
 
  f       ,(<   %<         
p      .<  
828p      <  
"p      =<    "  
!!          
  p      <     828  5<       
 , <    )! %! " $5>& "" " "     q     4 6 24          - 2               - 26 9 9  259$9            - 2- 9 $;  > < e" 9,k,4?!94k2?!  2,?k4,?!  24?k2?!  2?k2 ?  )) 9,!94  9,k,5?!94k2?  )) 9,!i94  9,k,?!94k2?  )) 2,?!24?  9 2,?k46?!  24?k2?  )) 2,?!i24?  9 2,?k4+?!  24?k2?  )) 2,?!j45?  9 2,?k6-? $ /  !  7  9, ,4?
 7   94 2?8 ))9,!948 2? ,4?!""
,5?   9,

 
             !  <    #)  
     #)    
    #)    
8,8  "            p  828"
    
 
  ,(<   %< 1   .<  
828p      <  
p      =<     828  < 1   5< 1  , <   )!%!" $5>& "" " "     q     4 6 54          - 5               - 56 9 9  559$9            - 5- 9 $;  > < e"9,k,4?!94k2?!  2,?k4,?!  24?k2?!  2?k2 ?  #) 9,!94  9,k24?!94k2?  #) 9,!i94  9,k24?!94k2?  #) 2,?!24?  9 2,?k2,?!  24?k2?  #) 2,?!i24?  9 2,?k22?!  24?k2?  #) 2,?!j45?  9 2,?k4,? $ /  !  7  9, "
,4?
  7  94 2?8 #)9,!948   #)
   2?   "
,4?!""
24?  9,

 
          )  !  )  !  <  '2( '2( #) '(    '( '( #) '2(    
'  (   #)d '<+(   ' 
( 
     #       

  ,(<   %< 1   .<  
828p      <   828  =< 1  < 1   5< 1  , <   )!%!" $5>& "" " "    
001      - - 2 9      00     - - 9 2       
  2      
   (  )
      
 33   
 45
 6       !  > < e" 9,k2?  2,?k25?  + #) 9,!2,?,  9,k2-?!  2,?k25?  + #) 2,?,!9,  9 2,?k25?!9,k2? $ /  !
  2,? "
25?'22222,2,+(   7  9, 2?' 22222,,,+(8+ #)9,!2,?,8  #),"
 
  '828(2"
   9, ' (!""
2-?' 22222,,2+(  9,

 
       )%  !  <  '2(3 '(    
    '
   (d '<+(   d  p           
      ,(<   %< 1   .<   p      <   828  =< 1  < 1   5< 1  , <    )! %! " $5>& "" " "    
001      - , 2 9   7    
       
   
         
 313   
 45
 6       !  > < e" 9,k2?  2,?k2,?  +0 9,!2,?,  9,k2?!  2,?k2,? $  7  9, "
2?'22222,,,+(
   2,? "
2,?'2222222,+(!8+09,!2,?,8      
  '2,?(d     '9,(+ 
"
    !d 'c(  .< e  '2)5?(

 
         ) %  <  '( #&'( 
      
      ,(<   %< 1   .<  
828p      <   828  =< 1  < 1   5< 1  , <    )! %! " $5>& "" " "   
001     4 6 5    7    
       
   
        
 89   
 45
 6       !  > < e" 9,k2?  +$ 9,,  9,k25? $ 7  9, "
2?'22222,,,+(!8+$9,,8     ""
25?'22222,2,+(  9, + 
 
    828!d 'c(.< e  '2)5?(     

 
        )    <  '( 2 +$9
      
      ,(<   #    , <    )! %! " $5>& "" " "   
001     4 6     7    
       
   
           
 819   
 45
 6       !  > < e" 9,k2?  +$9 9,,  9,k25? $"
  7  9,2?'22222,,,+(!8+$99,,8       9,!""
25?'22222,2,+(

 
         )   <  '( , +$
    
      ,(<   #    , <    )! %! " $5>& "" " "   
00    4 6         
       
   
        
 89   
 45
 6       !  > < e" 9,k2?  +$ 9,  9,k2.? $ 7  9, "
2?'22222,,,+(!8+$9,8      9, 8,8!""
2.?'2222,,,,+(

 
         )  !  )  !  <  '2( '2(&9 '(   '( '(&9 '2(    
'  (  &9d '<+(   ' 
( 
"
      #       

  ,(<   %< 1   .<  
828p      <   828  =< 1  < 1   5< 1  , <   )! %! " $5>& "" " "    
001       - 2 2 9      00      - 2 9 2   7    
  2      
   (  )    
     
 89   
 45
 6       > < e" 9,k2?  2,?k2?  +&9 9,!2,?,  9,k2?!  2,?k2?  +&9 2,?4!9,  9 2,?k2?!9,k2? $ / !  7  9, "
2?'22222,,,+( 
  2,?"
2?'222222,,+(8+&99,!2,?,8   &9    2,?'
(d  9,' (" "
'2?( 7  9, $ / !   2,? "
2?'222222,,+( 
 7  9,"
2?'22222,,,+(8+&92,?4!9,8   &9    2,?' (d  9,'
(""
 2?  2,?

 
      ! "#$ %& )? , !  <  $ '(828!0 0g   
  $828! "     
       
  
 & !
   +a9.
 /
 ,(<   #    , <       )! %! " $5>& "" " "     001     ,2  9        
        
     
 33     
 45
 6       !  > < e" 9,k2?  +a9. r$0!9,  0*
  r$0   $ 7  9, "
2?'22222,,,+(!8+a9.r$0!9,8 + 
828! "  00*
        r$0'9    
    g,4 3,4(

 
       ! "#$ %!$ )?  !  <  $ '(8,8!0 0g   
  $8,8! "     
        0 & !
   +a9
 /
 ,(<   #    , <       )! %! " $5>& "" " "   00     ,2  9         
        
     
 33     
 45
 6       !  > < e" 9,k2?  +a9 r$0!9,, $ 7  9, "
2?'22222,,,+(!8+a9r$0!9,,8  
  '9,(+ 
8,8! "   00*
       r$0 9     +a9
 
    g,4 3,4

 
        ' );    !  );  !  <  '2( '2(:&9 '(   '( '(:&9 '2(    
'  (  / 
"&9d '<+(  ' 
( 
     #       

  ,(<   %< 1   .<  
828p      <   828  =< 1  < 1   5< 1  , <    )! %! " $5>& "" " "    
001       - 4 2 9      00      - 4 9 2   7    
  2      
   (  )
      
 33   
 45
 6       !  > < e" 9,k2?'22222,,,+(  2,?k2?'222222,,+(  +:&9 9,!2,?,  9,k2-?!  2,?k2?  +:&9 2,?4!9,  9 2,?k2?!9,k2? $ / !  7  9,"
2?'22222,,,+( 
  2,?"
2?'222222,,+(8+:&99,!2,?,8/ 
" &9    2,?'
(d  9,' ( 
 "
 d  9,! "
 2? 2-?"
 
  2,?
 

 
       (
$ %##  <  0 03,  i0 0<  0 03,  i0 0? 0      
  
     7  
  "

   
    <<
          
    
   
   
 

 '9=( 
  
     9=    7 7   
  ,(<   #    , <    )! %! " $5>& "" " "        ,6 .- )        4 ,4 .6 $99       4 ,6 )6 $   > < e" 92k5?!9,k4,?!0k, 6?!0k2224?   << 54,?  0k2222?       ';   2222?k, ?!222,?k6 ?!        !6 ?   
 (   << i992  0k2222?'2222?k, ?!222,?k6n?(   << j62?  0k2222?'2222?k, ?!222,?k6n?( $ / !  
 "
, 6? 7    "
2224?!8 <<54,?8

0"
     7  7        2222?0 "
 54,?!   
   b
  /
 $    
  7    / ! 8 <<i9928 
 
/  6n?  7   222,?' 
 
  
(0  "
54,?!   
   b
  /
 
    
  7     / !   2262? 5?   226,? 4,?!8 <<j62?8 
 
 / 

 
      & %%,  <   #&   '(  $k8,8!"
       d  $k828!"
         ,(<   %<    #      , <    )! %! " $5>&       , 6 =.  > < e"   k828  . $  k828!.
   .< e  '2)5?(! "
   d     

 
       %#   <   828       828 ,(<   #    , <    )! %! " $5>& "" " "        4 6 +2 9  6+, $9  > <  e" 9 22?k6.?!  2,?k24?!  24?k5=?  <9 22?  9 22?k22?  <9 i2,?  9 2,?k24?!  24?k22? $9 '9(  !8<922?8     22? "
 22? $ / !8<9i2,?8
$  9 '$9(      24?  "
 22?

 
        %   <   #&         ' f  ( 8,8   828!" "  ,(<   %< 1   .<  
828p      <  
p      =<    828  < 1   5< 1  , <    )! %! " $5>& "" " "        4 6 -2 9        6 -, $9  > < e" 9,k2?  2?k2.,? &;9,  9,k2.? &;i9,  9,k2?!  2?k2=? $ / !  7  9, "
2?'22222,,,+( 8&;9,8  9,        d !   d     !""
2.?',,,,,222+( $ / !$  9 '$9(  
   "
    2?',,,,222,+(!""
2=?'2222,,,2+(

 
         % !  <  3  
      '
   (   !          
      ,(<   %< 8 8
' s(p      .<  
828p      <  
"p      =<    "  
p      < 1   5< 1  , <    )! %! " $5>& "" " "     q     4 6 4          -             - 6 9 9        - 5 9 $9         - - 9 $;  > < ,e" 9,k24?94k2?  0 9,!94     7  9, "
24?
  94  "
2?809,!948
  94"
'
%
 (  9,"
' %
(+ 
8 8
  "! "
 8,8  4e" 9,k25?94k2 ?  0 9,!94  a0 1e=!r$0  $# 9,  r$0 <) 9!9, $/  !  7  9, "
25?    
 7  94'2 ?(809,!948  k8,8  a0
   *
  r$0    8<)9!9,8 /
 !"
2-?  7  9

 
    
" "
#$)$ % ? ! !9  <  $3 k828!0 0g9  $  $ g, 
      '
   (   $ 
828!  "    
           
 & !
   0$a= 
 /
$  !
     / 
 /
 ,(<   #    , <      )! %! " $5>& "" " "        9     ,4 4  $   > < e" 9,k24?!94k2?!  2?k24?  0$a= 9,!i94!r$0 94k26?!0*
  r$0   $/ ! 7  9, "
24?! 7  94"
 2?!  2 24?80$a=9,!i94!r$08   i94 "
24?'222222,2+( 24?'222222,2+(+ 
 
      equal ! "  00*
        r$0
  '94(  !""
 26? 9     0$a=
 
    g,4 3,4

 
    
 " "
#$*)$ % ?  ! !9  <  $3  828!0 0g9  $  $ g, 
      '
   (   $ 
  828! "    
           
 & 
   0$a#= 
 /
$  
     / 
  ,(<   #    , <      )! %! " $5>& "" " "        9     ,4 )4  $   > < e" 9,k24?!94k2?!  2?k26?  0$a#= 9,!i94!r$0 94k26?!0*
  r$0    7  9, "
24?! 7  94'
  ( "
2?!   2"
26?80$a#=9,!i94!r$08 
  26?'22222,22+( 24?'222222,2+(+ 
 
      non- equal ! "  00*
       r$0
    '94(   !""
  26? 9     0$a#=
 
    g,4 3,4

 
      
+$    <   )     *
   6+)     
      .  ' ))! )( 
   '1+!+(!          '   
     
 "  
    +)(  %! )* )2@- =$5>& 5,( )* )8@4 =$5>&  """ )! %! *  2 23n 2 23n 22 2  2 23 2 3. 2- 2  2 23n , 23 2- 2 )) 2 3. 2 23n -2 , ) 2 n3. 2 3. -- ,  2 3. , 23 -- ,  , 234 2 23n -2 ,  , 234 2 3. -- ,  , 23 , 23 -- ,  2 23n 2 23n 22k322 2 1+ 2 23 , -3. . k32- 2 + , 3. 2 23n 2k3-2 ,  , -3. , -3. n k3-- ,  ,(<  %<       p    '(  .<  
828p      <  
p      =< 1  < 1   5< 1  , <    )! %! " $5>& "" " "        4 6 62 9        6 6, $9 

 
     
+$    ' 
( > <  e" 7  92 "
,5'+)(! 7  9, 4   '+)(! 4? 6-'+)(  )) 9,!92 p  828!? 828!+63k!23k!9, ?  )   9,  p 9, ?g2- $     
+)"
,54! 

64
   ! " !        
        222,2,2, ,5  g 22,22,,,  4   22,,,,22 k ?   ) 
 *
 
   +)      22,,,,22  g 22222,,2    2,2222,2 k 64   
"
" "!  1+ 4?!92 p  828!? 828!+63k!23k,  )   i9, p i9, ,32   ""
,'+)( 4?'i9,(

 
   
    %  <   3,          ,(<   %< 1   .<  
828p      <  
"p      =<    "  
p      < 1   5< 1  , <    )! %! " $5>& "" " "        4 6 22 9        6 2, $9  > < e" 9,k2?  2?k,2? )=9,  9,k24? )=i9,  9 2?k2.? $ / ! 7  9, "
2?!8)=9,8  / "
 !""
24?$ / ! 8)=i9,8 "
,2?    2? !""
2.?

 
   
   
 %:  <   3,      ' 
" (         ,-"
   ,(<   %< 1   .<  
828p      <  
"p      =<    "  
p      < 1   5< 1  , <    )! %! " $5>& "" " "        4  2 99         , $9  > < e" 92k,4?!9,k6?!94k2?!  2?k2.?!  ,?k4,?  )=> 992  92k,4?!9,k? )=>i94  9 2?k2.?!  ,?k42? $ / !   92 "
,4?  9, "
6?8)=>9928 92    9,,-   "
 9, !""
?   *        % !("*.4)   !  +:    /6
  $    

  +:       !#$   <&&0 )=> 992  <)  94!9,  &9 94!92  a9  #c!<&&0 

 
       , $    <  t;'2( 2 +d       !t;2!   828!  
 $
 b
 
     "
 ! 
01  " 
  ,(<   #    , <    )! %! " $5>&       , 6 .  > < e" t;k2,? )$ $"
 t;  2,?!8)$8""
22?     t;2 828!
 

 
       %
-. 
/   =  !  <   u    '100=9( 9=; $#)=9   '<&>=9( o1&$=#    ',-("
  '(b
'(        '( 
    >b
 4!
  
   "    b
     +     
   ,(<   %< @b
44n3,p      .< "  b
k828p      < ;+ b
k8,8p      =< b
 4  " k828p      < 1   5< 1  , <    )! %! " $5>& "" " "           4-%,2h n6 99 9        4-%,2h n5 99 $9        4-%,2h n- 99 $; h =/
 7,2  "d   !  !74-   > < e" 92k,2?!9,k2?!94k62?!  62?k2?  )$@992!94  92k2?!9,k62?  )$@992!i94  92k2?!9,k42?  )$@992!j42?  92k2?!9,k2? $ / !  7    992 "
,2?'92( 2?'9,(!  94 "
62?8)$@992!948" ,-992"
"
 94'
(    )$@
 !92 "
2?9, 62?   
      992'92(b
  '9,(

 
      
#$ 0*1 ? .  ! <    3,   $  2!0 0g  7  

  $         d   ! "    
        0   " g ,4 3,4! "
 07   
    )a#c      !;<%    = !!  ! 
   
            1+1> 1+"> 4?4?14?    ,(<   #    , <   )! %! " $5>& "" " "   q   4 '*
 7(  9      ' *
 ( k2 .   > < e" 9,k24?<&&0  "   90 j22?  )a#c 9,!<&&0 )a#c  
   8 8 
 $ !
     
   " "
$/ ! 7  9, "
24?!<&&0  "  8)a#c9,!<&&08   9, !""
2,? + 
  9,    d !*
 7  "    <&&0 

 
   
 , $    <   t;'2( , =$
 d     !t;2 8,8 
   " 
'
"  ($
f  
 '/
)$
 (! "  =$
 /
 ,(<   #    , <    )! %! " $5>&       , 6 n.  > < e" t;k22? =$ $t;   "
22?!!
 
! 8=$8t;   2,?!
't;2   
 (

 
   

       <  0 034 i0 $0 $0 0 0 i$0 $0 $0g4 
 

   
   
    
  7  
 '0("
   
         
      0!
      ,(<   #    , <     )! %! " $5>&       , ,6 ,.  > <     /    
=#=9 45 

&& 

#  " ! && 

 # # / 
+% ### (/ ##"" ## # 5- "" 45 45 

45 && 

#  " ! && 

 # # / 
+% 6$ && && && ## ! ##"# ## 5- 6$ && && && /' $ # "# " "" ( ## #   

 
   
  2  ;   < $0 i0  0 0g4 0 i$0 $0 $0g4 
 

   
 7"
    
          
       
 !
       ,(<   #    , <    )! %! " $5>&       , ,- 4.  > <    /    
=:$ 45 

&& 

#  && 

# ## / 
+% ### (/ ##"" ## # 5- "" 45 45 

45 && 

# && 

/ 
+% 5-/ & 5- 67  ## ! ##"# ## 5- 
$  # "# " "" ( ## #   

 
     
 
   #  <  '   ( $)<=
  01  7   7     
 $   
 b
'$9o( /      ,(<   #    , <    )! %! " $5>& "" " "         , 6 -. 3 3  > < 
  #  01  7
     7

 
        %   <    g,           ,(<   %< 1   .<  
828p      <  
"p      =<    "  
p      < 1   5< 1  , <    )! %! " $5>& "" " "   q   , 6 =       k2 .        4 6 42 9     6 4, $9  > < e" 92k,+?!  22?k2?!  ,+?k2.?  $#92  92k,?  $#22?  9 22?k2)?  $#i92  92k,+?!  2,?k,2? $ / !  7  92 "
,+?! 8$#928""
,?    /   $#
      22?! 
 "
2? $ / !$#
$  9 '$9(    "
   ,+? 2.? ,2?

 
      
 %:   <    g,    ' 
"  (        ,-"
   ,(<   %< 1   .<  
828p      <  
"p      =<    "  
p      < 1   5< 1  , <    )! %! " $5>& "" " "        4  2 99         , $9  > < e" 92k, ?!9,k24?!  24?k2.?!  2?k2..?  $#> 992  92k, ?!9,k2?  $#> i9,  9 24?k,2?!  2?k22? $ / ! 7    992 "
, ?  92 24?  9,8$#>9928 ,-  ! ""
2?  9,$ / !8$#>i9,8
$  9 '$9(         2?  2..? 22?  24? 2.? ,2?   *        %(%) !("*.4)   !    <+:   /6
  $    

   <+:           !#$ 7  <&&0 $#> 992    <)  94!9,    &9 94!92    a9  #c!<&&0 

 
    
   $  $  $9='# (  9='.( < .< e i0 0 ? $0  0 0g, .< e .< ef 0 i0  .$ 2  0 0g4  t;'2( , 
 
 
 " 
$       
 $   
 8 $9=8/
  

'.$!  .< e  !2)5?(  'k828($ 

!$9=  .$  " 
 ,(<         '! 

( , <   $9= '# (   )! %! " $5>&       , ,4 +.  $9= '.(  +   &  '?/(       , - +.  > <  $
 !
    ,22?    
  >

!  
 
        
0 *
   ,22?$0 7  
   
  " 
 *
  $9=  ..?  
   ,22?88 
  
  *
   7   #  !/
 
$0  ,22? 4 68 4$') 1 + /' $ 95/ #  ##     7       $ #$ 6          @$ ?/ $      
        /?/   
  $

          $    (      ?! )

 
      #.3( ? ! '  ( ?  '1  ( <   $ 
!0    a1;0
                 ' (
!  !
   a0 
 /

  a0      0             0 ,(<   #    , <         )! %! " $5>& "" " "   q      ) )         k2 .          4  2 $99    /2    
 
  @$
 ,    
  @$ ,       2     (
  @$) 
 

    a+a   > < e"   '(k8,8!  22k2,?!  2,k42?   a0 !< +=  < +=k,222?!0k,222?  a0 i22?    0k2,42?  /    a0 
   8,8! 8a0!< +=8     0"
,222?        ?   !  
"     a0
   /  
  a08a0i228     0      22?2,?!""
2,42?

 
      #$ % ?  ! <  $ 
!0 0g $       ' (
! "    
          
 !  !
   a9
 /
'        (    " g,4!3,4! "
   
  7    
   a9 ,(<   #    , <        )! %! " $5>& "" " "  q     4 - + 9         k2 .                  
 

 $
     !  > < e"   k8,8< +=x(!8a9!< +=   
 & !  
   a9/


 
       # !  <       
    
f  
  ,(<   #    , <   )! %! " $5>& "" " "    q      4 6   $; 6  9    q     4 6 n 9   k2 .    q    4 6     6)$           - =6 9 9 -=59$9         - =- 9 $; -)-$9$;         - .5 $9 9    q  /   -   /l m     q /   - n /l m  

 
      
 # ' 
( > <  e"92k2,?!9,k2 ?!  22?k2,?!  2,?k42?!   24?k24?!<&&0k2?!    ?k2..?  <) 92!j,2?   92k,2?  <) 92!2,?   92k42?!  2,?k42?  <) 2,?!92   9 2,?k2,?!92k2,?  <) 9,!i92   9,k42?!92k2,?  <) i92!9,   92k2,?!9,k2 ?!  2,?k2 ?  <) 22?!2,?   9 22?k42?!  2,?k42?  <) 24?!i22?   9 24?k42?!  22?k2,?  <) 22?!j2 ?   9 22?k2 ?  <) i22?!j,2?  9 22?k2,?!  2,?k,2?  <) i22?!24?   9 22?k2,?!  2,?k24!        24?k24?  <) 92!j<&&0l9,m  92k2..?!9,k2 ?  <) j<&&0l92m!9,  9 ,?k2 ?!92k2,?!9,k2 ?

 
      
  #)   !  #)   !  <  '2(  '(    '(  '2(    
  d '<+(  ! d   
      #        

  ,(<   #    , <    )! %! " $5>& "" " "    
001       - 6 2 9      00      - 6 9 2       
       
   (  )
       
 33   
 45
 6       !  > < e" 92k2-?   22?k25?  <)+ 92!22?4  92k2?!  22?k25? <)+ 22?2!92  92k2-?!  22?k26? $ / !  7  92 "
2-?
    22?"
25?8<)92!22?48  "
  22?   d  92  !""
2?  92 $ / !22?   8<)22?2!928  d    92   'd (    !"26?    22?

 
     
 
3 #% !  # !  <     
         7   " "  
"
 
 <)      <)=    78$ 8 8 8"
"
      
     ,(<   #    , <    )! %! " $5>& "" " "   ,  q     , 1 +2   4  0
  , 1 2    
0  :   2 , b  c4de 6  0
 :   2 , "b c4de  5 
0  :<
:<     *b  cde -  0
 :<
:<     5b cde   
01111 )
)     *b  *   01111 )
)     5b *  n 
0111 )
)     *b  * ,2  0111 )
)     5b *      / ( ) = !! $ de f
    ! $ 1g , "  2
 
   3c4de3
  
 3c4de3    2 "  f
 
   3cde
  
 3cde3      /*
  6    b
h 
 
 $!/ 
    6   
   i
1 
 
 
  f      
 
  
  
 

 
     
 
3 #%a#  ' 
( > < e"92k,,?!9,k6?!94k2,?!9k26?p0       2,2?k6.?!2,26?k, !2,25?k-)?!,,26?k?   =/        2,2?k5.?!2,26?k4 ?!2,25?k)?!,,26?kn?  <) 92!i994  p 92        2,26?p       p 92k, ?!94k2,?!9k26?  <)= 92!i994  p 92   /             2,26?p       p 92k4 ?!94k2,?!9k26?  <) i994!92  p ,,?'  92(            p   2,26?'994(p92!94!9     <)= i994!92  p ,,?'  92(  /                  p   2,26?'994(p92!94!9     <) 92!j2,?l994m p 92        2,25?       p '2,?g994(p92k-)?!94k2,?!9k26?  <)= 92!j2,?l994m p 92   /             2,25?       p '2,?g994(p92k)?!94k2,?!9k26?  <) j2,?l994m!92 p ,,?'  92(                p 2,25?'2,?g2,26?(  <)= j2,?l994m!92 p ,,?'  92(  /                  p   2,25?'2,?g2,26?(  <) 92!j,222?l994m p 92        ,,26?       p ',222?g2,26?(p92k?!94k2,?!9k26?  <)= 92!j,222?l994m p 92   /             ,,26?       p ',222?g2,26?(p92kn?!94k2,?!9k26?  <) 92!,,26?  p 92        ,,26?       p 92k?  <)= 92!,,26?  p 92   /             ,,26?p       p 92kn?   <) ,,25?!92  p ,,?'  92(                p ,,25?p',,25?( ,,?  <)= ,,25?!92  p ,,?'  92(  /                  p   ,,25?p',,25?( ,,?     /+
       $$ 
 =
?aj $
6  

 
      
 
3
  #%   !  #  !  <          3, 
  
 
  7  7                    7      
              
 
    <))      <)=)   /     78$ 8"
      
    ,(<   #    , <    )! %! " $5>& "" " "     q     4 ,2 =4  $   > < e" 9-k,2?!9k?!9k,4?!     ,2?k2)?!  /    ,2?k2))?  <)) 9!i99-  p 2)?'       ,2?(                p  999-  p       p 9k2)?!9-k,2?!9k4?'99- 99-3,(  <)=) 9!i99-  p 2))?'     ,2?(                 p  999-    '99- 99-3,(p       p 9k2))?!9-k,2?!9k4?          
 
  
  
 

 
     
  
3
 #%    !  #   !  <        g, 
  
 
  7  7                    7      
            
    
 
  <)$      <)=$   /   7 8$ 8"
      
    ,(<   #    , <    )! %! " $5>& "" " "     q     4 ,2 =  $   > < e" 9-k,2?!9k?!9k,4?!     ,2?k2)?  ,26?k25?p/    ,2?k2))?,26?k2)5?  <)$ 9!i99-  p 2)?'       ,2?(                p  999-    '99- 99-g,(p       p 9k2)?!9-k,2?!9k6?  <)=$ 9!i99-  p 2))?'     ,2?(                 p  999-    '99- 99-g,(p       p 9k2))?!9-k,2?!9k6?          
 
  
  
  y

 
      
 
3 (*  #%  !  #  !  <    3,     
  
  7                   7         
           
 
  <)0)      <)=0)   /    78$ 8"
      
  /   ,(<   #    , <    )! %! " $5>& "" " "      q    4 ,6 .4 $    > < e" 92k?!9-k2?!9k22?  <)0) i99-!92  p '99- 99-3,(       p ?'  92(            p   4...?'222?3,?(p       p 92k?!9-k4.?!9k2..?  <)=0) i99-!92  p '99- 99-3,(       p ?'  92(  /                p   4...?'222?3,?(p           
 
  
  
 

 
     
  
3 (*  #% !  #   !  <     g,      
  
  7                   7         
          
 
  <)0$      <)=0$   /    78$ 8"
      
    ,(<   #    , <    )! %! " $5>& "" " "      q    4 ,6 . $    > < e" 92k.?!9-k4,?!9k2..?  <)0$ i99-!92  p '99- 99-g,(       p .?'  92(            p   4422?'4,..?g,?(p       p 92k.?!9-k44?!9k22?  <)=0$ i99-!92  p '99- 99-g,(       p .?'  92(  /                p   4422?'4,..?g,?(p       p 92k.?!9-k44?!9k22?           
 
  
  
 

 
      

#:   !  <        
' (      
    
  ,(<   #    , <   )!%!" $5>& "" " "            6 99 99         5 99 $9          6  - 99 $;<  > <  e" 96k2-?!95k,?!9-k25?!9k24?!  22?k, ?!  2,?k24?!   24?k2?!  2?k2.?   <)> 99-!996  9-k2-?!9k,?!96k2-?!95k,?  <)> 22?!24?  9 22?k2?!  2,?k2.?!        24?k2?!  2?k2.?  <)> 994!i9  94k2?!9k2.?!  <)> 26?!i2,? 9 26?k2?!  25?k2.?  <)> 99-!j,46?  9-k,4?!9k6?  <)> 24?!j2.=)? 9 24?k2.?!  2?k2=)? $ / !  8<)>22?!24?8    
 24?2?   22?2,?""
2?    22?"
2.?  2,? & /    
<)>
 " 
    

 
      3$ -. 
/ +#   !  <          '"
        (
  
  '( 
',-(          +     
  ,(<   %<  
 > 455p      .<  
828p      < ;+  
8,8p      =<    < 1   5< 1  , <    )! %! " $5>& "" " "           44 6 99 9        44 5 99 $9        44 - 99 $;  > < e" 9 22?k42?!  2,?k2?!  24?k2n?!  2?k2-?  ;1< 22?!24?  9 22?k2,?!  2,?k42?!        24?k2n?  ;1< 22?!i2,?  9 22?k22?!  2,?k22?  ;1< 22?!j2?  9 22?k2-?!  2,?k22? $ / !8;1<22?!24?8
    '   22?     22?!2,?(
  24?  '2n?( ,- 
!2,42?!     22?!2,?

 
    
  2  ;  < 0 i$0 $0 $0g4 #=:
 

   
       
       
  
      ,(<   #    , <    )! %! " $5>&       , ,2 2.  > <      /    
#=:
     
                     
  
                    
   

 
          <  #      01/

   !   #&0  /
b
      " 
   ,(<   #    , <    )! %! " $5>&       , 6 ..  > <   >
 #&0/
  !    
$!   
 /
    /          
 
 

 
          !  <    &9  
    &9    
     
 
 &9    
8,8  "        8,8!  !828   ,(<   %< 1   .<  
828p      <  
p      =<     828  < 1   5< 1  , <    )! %! " $5>& "" " "     q     4 6 64          - 6            - 66 9 9        - 65 9 $9         - 6- 9 $;  > < e" 92k,5?!9,k4 ?!94k2,?!  22?k2?!  2,?k?!   2?k ?  &9 92!9,  92k.?!9,k4 ?  &9 92!i94  92k?!94k2,?!  2,?k?  &9 22?!2,?  9 22?k.?!  2,?k?  &9 2,?!i22?  9 22?k2?!  2,?k2+.?  &9 22?!j24?  9 22?k2 ? $ / ! 7  92 "
,5?  9, "
4 ?!8&992!9,8  &9929,      
'.?(   92 & /  
   &9
 " 
    

 
      (0 4     <   i0  0 0g,       7        7     ,(<   #    , <    )! %! " $5>& "" " "        4  52 9         5, $9  > < e" 9 22?k2,?!  2,?k,+?!0?'2)?(k22?!0<'2)n?(k2.+?!   7  2.+?k55?  0&0 22?  9 22?k55?!0k22.?  0&0 i22?  9 22?k2,?!  2,?k55?!0k22.? $ / !   22? "
2,?80&022?8      22.+?'55?(    22?   7     22? "
55?0    22.?

 
      (. 4- / +  !  <     $9 $93, 
 
 
  7          
  7      
  7    ,(<   #    , <    )! %! " $5>& "" " "            n4 9 $9  > < e" 9 22?k64?'
  7    (!  64?k-.?!   24?k2?  0&01) 24?!i22?  9 22?k6,?!  24?k-.?!  64?k  -.? 24?$   22? "
64?  64?"
-.?! 80&01)24?!i22?8     64?    
  7    !""
6,?

 
       (. 4- / +    !  <     $9 $9g, 0&01$
 
 
  7         
  7      
   7    ,(<   #    , <    )! %! " $5>& "" " "            n 9 $9  > < e" 9 22?k2,?  2,?k2?  0&01$ 24?!i22?  9 22?k24?!  2,?k2?!  24?k       2? $   22? "
2,?  2,?"
2?! 80&01$24?!i22?8 "
2?     24?
  7  '  22?(  ! "
 2,?  24?

 
      ($  4 +5     <  0 03,   i0   01?
   7  "
   
' (       7      "
    7 ,(<   #    , <    )! %! " $5>& "" " "         4 '   7( 2 9        '/   7(              '   7(          '/   7( , $9  > < e" 9 62?k6.?!  6.?k2 ?!0?k22?!0<k22?  01? 62?  9 62?k6.?! 7  2..?k6.?!       0?k2..?!0<k2..?  01? i62?  9 62?k6.?!  6.?k2 ?! 7         2..?k2 ?!0?k2..?!0<k2..? $ / ! 7   "
2222?!   62? "
6.?!801?62?8  7   2222 2....?$      62?   2....?"
     7

 
      ($. 4- / +5+ !  < $9 $93,    
 
  
  7  01?1)  
  7     
       7   ,(<   #    , <    )! %! " $5>& "" " "            4 $9 9  > < e" 9 22?k2?!  2,?k25?!  24?k, ?  01?1) i22?!2,?  9 22?k24?!  2,?k25?!        24?k25? $
  7  '  22?! / ( "
2?! 801?1)i22?!2,?8 
  7   !""
24? 2,?  "
!25?!      
   7  

 
     ($. 4- / +5+   !  < $9 $9g,     
 
 
  7  01?1$ 
   7     
        
  7   ,(<   #    , <    )! %! " $5>& "" " "             $9 9  > < e" 9 22?k2?!  2,?k25?!  26?k4 ?  01?1$ i22?!2,?  9 22?k26?!  2,?k25?!        26?k25? $
  7  '  22?! / ( "
2?! 801?1$i22?!2,?8 
  7   !""
26?2,?  "
!25?!      
  7  

 
       & %, 9. <   2         d !    "
"
 ,(< %<   828 #      , <    )! %! " $5>&       , 6 .  > < e" k8,8 828 
 9.    '(   d 

 
    
   $   < 0 i0  0 0g4 9=
  
  
  "
/
 
   
  <<
       7       
 / /
     
 "
 ,(<   #    , <    )! %! " $5>&       , ,2 .  > < e" 0k22.?!'0(k,2, ?!0k,46 9=  0k,2, ?!0k22.=? 9=
     7    22.?',2?(     
  7   "
  22.=?', ?(  0f 
   ,2, ?/
 7        22.=?

 
        0  #  <  '(  '2( '(  'g,( '(!k23-           "
   " d '<+(        ! 
  # -  ,(<   %<       '(8,8  .<  
828p      <  
p      =<    "  
p      < 1   5< 1  , <    )! %! " $5>& "" " "        4 6 n2 9        6 n, $9  > < e" 9 22?k2 ?!  2,?k24?  24?k,?  9<  22?  9 22?k55?!k8,8  9<  i2,?  9 2,?k24?!  24?k4=?!k828 $ / !   22? "
2 ?',2,2,2,2+(! 89<22?8 2 ?"
   !""
55? '2,2,2,2,+(  '( "  '@(

 
        0  $ #%    <  '2(   '(  'g,( '(!k23-              "
      '(!"
       d  # -  ,(<   %<       '(8,8  .<  
828p      <  
p      =<    "  
!!   
       p      < 1   5< 1  , <    )! %! " $5>& "" " "        4 6 ,2 9        6 ,, $9  > < e" 9 22?k2 ?!  2,?k24?!  24?k,?!k828  9< 22?  9 22?k56?!k8,8  9< i2,?  9 2,?k24?!  24?k4=?!k828 $ / !   22?"
2 ?',2,2,2,2+(! 89<22?8 2 ?    "
    "
    d    22?!""
55? '2,2,2,2,+(;+   22?    8,8 "  

 
               <  '2(  '( '2(  '( 'g,(!k23-            "
  d '<+( " ';+(      '( # -  ,(<   %<      'd (8,8  .<  
828p      <  
p      =<    "  
!!   
    p      < 1   5< 1  , <    )! %! " $5>& "" " "        4 6 =2 9  6=, $9  > < e" 9 22?k,?!  2,?k24?!  24?k,?  99 22?  9 22?kn?!k8,8  99 i2,?  9 2,?k24?!  24?k+?!k8,8 $ / !   22? "
,?'22,,222,+(! 89922?8 "
     "
 d   " !""
n?',22,,222+(    d    8,8 "     8,8

 
           $ %   <  '(   '2(  '( 'g,(!k23-               "
 d '<+(     !"
       ';+(  # -  ,(<   %<      'd (8,8  .<  
828      <  
p      =<    "  
!!   
      p      < 1   5< 1  , <    )! %! " $5>& "" " "        4 6 2 9        6 , $9  > < e" 9 22?k55?!  2,?k24?!  24?k,?!k828  99 22?  9 22?k4 ?!k8,8  99 i2,?  9 2,?k24?!  24?k2+?!k8,8 $ / !   22? "
55?'2,2,2,2,+(! 89922?8 "
     "
 d  '8,8(     "
 '8,8(   " "
4 ?'22,2,2,2+(   22? "        828

 
        45 )8  <  + #r 2 +2
   7 .< e  '.< e2(   d !  72   ,     ,(<   #    , <    )! %! " $5>&       , 6 6.  > <    )8   .< e2 828! 72   

 
       46 )  <  + #r , +,
 7 .< e  '.< e2(    !  7,   ,       5 =    $  
  4hh        ,(<   #    , <    )! %! " $5>&       , 6 5.  > <    ) .< e2 w,x! 7,    ' 7,    z   (

 
       $,    )%   !  <    3 3  
  ! 
"
   !
        
    
 
 
       f   
       $
      !
      '8 8( 
          
   
          ,(<   %<  
'  > (p      .<  
828p      <  
"p      =<    "  
!!            
 
p      <   8,8  5<            
  
p   ! w x , <    )! %! " $5>& "" " "     q     4 6 4          -             - 6 9 9        - 5 9 $9         - - 9 $;  > < e" 9,k,2?!94k2?!k8,8!  2,?k42?!  24?k2?!   2?k2 ?  + 9,!94  9,k2?!94k2?  + 9,!i94  9,k25?!94k2?!  2?k2 ?  + 2,?!24?  9 2,?k,?!  24?k2?  + 2,?!i24?  9 2,?k,5?!  24?k2?!        2?k2 ?  + 2,?!j ?  9 2,?kn5?p!!@k8,8 $ / ! 7  9, "
,2?  94 "
2?!8+9,!948
  
"
'2?("
 '8,8(  ',2?(  
'2?(  9,

 
       & %,  <  ,   '(     !    "
"
 ,(< %<   8,8 #      , <    )! %! " $5>&       , 6 ).  > <   %,    w,x

 
        0            <  '( '(  '2(  '( 'g,(!k23-               +d ' <+(     "
 '(
     -  # -   ,(<   %<  <+  'd (8,8  .<  
828p      <  
"p      =<     828  < 1   5< 1  , <    )! %! " $5>& "" " "        4 6 )2 9        6 ), $9  > < e" 9 22?kn ?!  24?k2?!  2?k2+?!k8,8  9  22?  9 22?k2)!k828  9  i24?  9 24?k2?!  2?k2)=?!k828 $ / !   22? "
n ?',22,,2,2+(! 89 22?8"
  22?    +d '828(  '8,8( -  ' 
 ( ""
2)?',,22,,2,+(   22?

 
          (        8       <  $ ',(k, '2(k2 902'3(  '3(  $ ',(k2 '2(k, 90,'3(  '3(  $ ',(k2 '2(k2 902'63(  '63(!  902'( 2       90,'63(  '63(!  90,'( , 
 d '<+(            !90290,+3        
       902     d 90,     ,(<   #    , <    )! %! " $5>& "" "          4 6 , $;  > <    b285     2'902(  2)-? 62?     ,'90,(  2)? 6? 8902j52?8
902 52?!890,j-?8
 90, -?      5#  4/a   k    4/+a<!  811119 a   4/a      # 

 
            < &0
   01  7  7 
        )
  !     01  !      !$%&           /      / 
.     ! 9== 
 < "
 b
    d  "    ,(<   #    , <    )! %! " $5>& "" " "         , 6 . 3 3  > <          

 
      $,   +)   !  <    3  
  
       
     
 
 
        f   
       ,(<   %< 8 8
p      .<  
828p      <  
"p      =<    "  
!!           
  
  p      <   8,8 5<            
   
p   w x , <    )! %! " $5>& "" " "     q   4 6 44    -4         - 46 9 9  -459$9       - 4- 9 $;  > < e" 9,k,4?!94k2?!  2,?k4,?!  24?k2?!  2?k2 ?  1+ 9,!94  9,k2.?!94k2?  1+ 9,!i94  9,k2?!94k2?  1+ 2,?!24?  9 2,?k,=?!  24?k2?  1+ 2,?!i24?  9 2,?k,?!  24?k2?  1+ 2,?!jn2?  9 2,?kn,?p!!@k8,8  1+ 2,?!j-5?  9 2,?k2+?pk8,8!@k828 $ / ! 7  9, "
,4?  94 "
2?!81+9,!948
  
"
'2?(   "
',4?(  
'2.?(   9,

 
        ,, :    <  '23( ? '63(     
 
 
       # !  ,(<   %< 1  .<  
828p      <  
p      =< 1  < 1   5< 1  , <    )! %! " $5>& "" " "        4 6 .2 9  6., $9  > < e" 9 22?k=?!  24?k2?!  2?k2 6?  > 0 22?  9 22?k2=?  > 0 i24?  9 24?k2?!  2?k6 ? $ / !   22? "
=?'22,,,,,2+(! 8> 022?8   
 
'(22?  ! ""
2=?',,,222,,+(

 
     !  $
34 %   !  <   '#&( #)  
         "
     8,8     
   '7(;     !  #) 
7d 'c(   7   
  
   
  ,(<   %< 1   .<  
828p      <  
p      =<     828  < 1   5< 1  , <    )! %! " $5>& "" " "     q     4 6 -4          - -            - -6 9 9        - -5 9 $9         - -- 9 $;  > < e" 92k2?!9,k24?!94k,4?!  22?k4+?!  2,?k24?!   24?k4?  ; 92!9,  92k2?!9,k24?!ck8,8  ; 92!i9,  92k2?!9,k24?!  24?k4?!ck828  ; 22?!2,?  9 22?k4+?!  2,?k24?!ck8,8  ; 22?!i2,?  9 22?k4+?!  2,?k24?!        24?k4?!ck8,8  ; 22?!j6  9 22?k4+?!ck828 $ / ! 7  92 "
2?',,222,,,+(  9,"
24?'222222,2+(!8;92!9,8      8,8"
+ 
7"
   !c         
 ;   

 
      ! $
34    !  <    #)  
        d "
     8,8     
   '7(!  #)   d 'c(   7    
 
   
  ,(<   %< 1   .<  
828p      <  
p      =<    828  < 1   5< 1  , <    )! %! " $5>& "" " "     q     4 6 4          -             - 6 9 9        - 5 9 $9         - - 9 $;  > < e" 92k2?!9,k24?!94k,?!  22?k4+?!  2,?k24?!   24?k4? ;92!9,  92k2?!9,k24?!ck828  ; 92!i9,  92k2?!9,k24?!  24?k4?!ck828  ; 22?!2,?  9 22?k4+?!  2,?k24?!ck828  ; 22?!i2,?  9 22?k4+?!  2,?k24?!        24?k4?!ck828  ; 22?!j56?  9 22?k4+?!ck8,8 $ / ! 7  92 "
2?',,222,,,+(  9,"
24?'222222,2+(!8;92!9,8     828"
+ 
7"
   !c      d     
 ;   

 
       0 $  :,  <  01 " 

!/  );    7   
>.$
   
! 
 
 ,(<   #    , <    )! %! " $5>&       , 6 .  ' l,2m)   > <      

 b
       8>.$8  

:7 $'+ /$ 
$)/ 
 7 7 7 7 7 7 4$')/++' 4$')1 +/' $ 7 7 7 - 
 $')(

 1 +/' $+/) & 6$
;  /;
 $') 
(/ $') 

 
        2$ % ;   !  <    :&9  
    / 
"&9    
   / 
"&9    
8,8 "        & !828  ,(<   %< 1   .<  
828p      <  
p      =<    828  < 1   5< 1  , <    )! %! " $5>& "" " "     q     4 6 +4      -+            - +6 9 9    -+59$9          - +- 9 $;  > < e" 92k2?!9,k24?!94k,?!  22?k4+?!  2,?k24?!   24?k4? :&992!9,  92k25?!9,k24?  :&9 92!i9,  92k2=6?!9,k24?!  24?k4?  :&9 22?!2,?  9 22?k4n?!  2,?k24?  :&9 22?!i2,?  9 22?k2?!  2,?k24?!        24?k4?  :&9 22?!j56?  9 22?k.? $ / ! 7  92 "
2?  9, "
24?!8:&992!9,8  / 
"&99,"
 92"
  
'25?(   92 

 
    ! 
 
          the clock frequency generation for the s3c8238/c8235/f8235 by an external crystal can range from 1 mhz to 8 mhz. the maximum cpu clock frequency is 8 mhz (mask version is 10 mhz). the x  and x  pins connect the external oscillator or clock source to the on-chip clock circuit.  
   the system clock circuit has the following components: ? external crystal or ceramic resonator oscillation source (or an external clock source) ? oscillator stop and wake-up functions ? programmable frequency divider for the cpu clock (fxx divided by 1, 2, 8, or 16) ? system clock control register, clkcon ? oscillator control register, osccon and stop control register, stpcon            ! "       #    " 

       
$ % &'( ) % )& % the two power-down modes, stop mode and idle mode, affect the system clock as follows: ? in stop mode, the main oscillator is halted. stop mode is released, and the oscillator started, by a reset operation or an external interrupt (with rc delay noise filter), and can be released by internal interrupt too when the sub-system oscillator is running and watch timer is operating with sub-system clock. ? in idle mode, the internal clock signal is gated to the cpu, but not to interrupt structure, timers and timer/ counters. idle mode is released by a reset or by an external or internal interrupt. 
                      !    "  !   #"$% &'   ("' )   *+ +,       "$"-./0 1 2  ')34  + 5    " "$ "0 " +. + &6+-, *3 * !+%!
 
      
 &  '  
 &" the system clock control register, clkcon, is located in the bank 0 of set 1, address d4h. it is read/write addressable and has the following functions: ? oscillator frequency divide-by value after the main oscillator is activated, and the fxx/16 (the slowest clock speed) is selected as the cpu clock. if necessary, you can then increase the cpu clock speed to f  /8, f  /2, or f  /1.    7 
4  #&6+% '-89   9
" &5 5 : 0 ; - ,   . +  3 # 7  <  .% +  3 # 7  <  .% ')3        7  2 = .. > "0 . > "$ . > "  > " #3)3 3% , !+ 
 &"  $ &- .  $  & when a main oscillator is selected, users cannot stop operating of a main oscillator by handling the osccon register but sub oscillator can be stopped. if users intend to stop operating of a main oscillator users must use "stop" instruction. when a sub oscillator is selected, users must do the contrary of the above case. in stop mode selected by the osccon register not by "stop" instruction, users can release stop mode only by handling the osccon register not by interrupts.

        
4  #+% 1,89   9 5 7 .9
" &5 5 : 0 ; - ,   . +  3    7   = . >         >            = . >    
+  >            = . >     
+  >         !  !      3 <!  #   7%9      !     !     4  9  
  



  !  !     ?    0; ##",:0$%  $  0%  8  ! <     !    4 )    !       4    !    3 3     ?   <   !  0;  +  3 /    &"  
4  #+% 1-89   9 5 7 .9
" &5 5 : 0 ; - ,   .   = !  )   > '    .... > @    0 ( ( &"
 
       

    during a power-on reset, the voltage at v  goes to high level and the  pin is forced to low level. the  signal is input through a schmitt trigger circuit where it is then synchronized with the cpu clock. this procedure brings s3c8238/c8235/f8235 into a known operating status. to allow time for internal cpu clock oscillation to stabilize, the  pin must be held to low level for a minimum time interval after the power supply comes within tolerance. the minimum required oscillation stabilization time for a reset operation is 1 millisecond. whenever a reset occurs during normal operation (that is, when both v  and  are high level), the  pin is forced low and the reset operation starts. all system and peripheral control registers are then reset to their default hardware values in summary, the following sequence of events occurs during a reset operation: ? interrupt is disabled. ? the watchdog function (basic timer) is enabled. ? ports 0-4 are set to input mode. ? peripheral control and data registers are disabled and reset to their default hardware values. ? the program counter (pc) is loaded with the program reset address in the rom, 0100h. ? when the programmed oscillation stabilization time interval has elapsed, the instruction stored in rom location 0100h (and 0101h) is fetched and executed.
    
in normal (masked rom) mode, the test pin is tied to v  . a reset enables access to the 16-kbyte on-chip rom. (the external interface is not automatically configured).
 to program the duration of the oscillation stabilization interval, you make the appropriate settings to the basic timer control register, btcon, before entering stop mode. also, if you do not want to use the basic timer watchdog function (which causes a system reset if a basic timer counter overflow occurs), you can disable it by writing '1010b' to the upper nibble of btcon.

         table 8-1, 8-2, 8-3 list the reset values for cpu and system registers, peripheral control registers, and peripheral data registers following a reset operation. the following notation is used to represent reset values: ? a "1" or a "0" shows the reset bit value as logic one or logic zero, respectively. ? an "x" means that the bit value is undefined after a reset. ? a dash ("?") means that the bit is either not used or not mapped, but read 0 is the bit value.      !"# $ %# & $  ' #(  )*+ !"# $
, -,)-". **$## /" %# & $  . 0 1 2  3    4 lcd control register lcon 208 d0h 0 0 0 0 0 0 0 0 lcd mode register lmod 209 d1h 0 0 0 0 0 0 0 0 location d2h is not mapped basic timer control register btcon 211 d3h 0 0 0 0 0 0 0 0 clock control register clkcon 212 d4h 0 0 0 0 0 0 0 0 system flags register flags 213 d5h x x x x x x 0 0 register pointer 0 rp0 214 d6h 1 1 0 0 0 ? ? ? register pointer 1 rp1 215 d7h 1 1 0 0 1 ? ? ? stack pointer (high byte) sph 216 d8h x x x x x x x x stack pointer (low byte) spl 217 d9h x x x x x x x x instruction pointer (high byte) iph 218 dah x x x x x x x x instruction pointer (low byte) ipl 219 dbh x x x x x x x x interrupt request register irq 220 dch 0 0 0 0 0 0 0 0 interrupt mask register imr 221 ddh x x x x x x x x system mode register sym 222 deh 0 ? ? x x x 0 0 register page pointer pp 223 dfh 0 0 0 0 0 0 0 0  
 
       5 /-( 4 !"# $ %# & $  ' #(  )*+ !"# $
, -,)-". **$## /" %# & $ # . 0 1 2  3    4 port 0 data register p0 224 e0h 0 0 0 0 0 0 0 0 port 1 data register p1 225 e1h 0 0 0 0 0 0 0 0 port 2 data register p2 226 e2h 0 0 0 0 0 0 0 0 port 3 data register p3 227 e3h ? ? ? ? 0 0 0 0 port 4 data register p4 228 e4h ? ? ? ? 0 0 0 0 port 0 interrupt control register p0int 229 e5h 0 0 0 0 0 0 0 0 port 0 interrupt pending register p0pnd 230 e6h 0 0 0 0 0 0 0 0 port 3 interrupt control register p3int 231 e7h ? ? ? ? 0 0 0 0 port 3 interrupt pending register p3pnd 232 e8h ? ? ? ? 0 0 0 0 timer a/1 interrupt pending register tintpnd 233 e9h ? ? ? ? 0 0 0 0 timer a control register tacon 234 eah 0 0 0 0 0 0 0 0 timer a counter register tacnt 235 ebh 0 0 0 0 0 0 0 0 timer a data register tadata 236 ech 1 1 1 1 1 1 1 1 timer b control register tbcon 237 edh 0 0 0 0 0 0 0 0 timer b data register(high byte) tbdatah 238 eeh 1 1 1 1 1 1 1 1 timer b data register(low byte) tbdatal 239 efh 1 1 1 1 1 1 1 1 key strobe data register ksdata 240 f0h 0 0 0 0 0 0 0 0 voltage level detector control register vldcon 241 f1h 0 0 0 0 0 0 0 0 watch timer control register wtcon 242 f2h 0 0 0 0 0 0 0 0 oscillator control register osccon 243 f3h 0 0 0 0 0 0 0 0 stop control register stpcon 244 f4h 0 0 0 0 0 0 0 0 pattern generation control register pgcon 245 f5h ? ? ? ? ? 0 0 0 pattern generation data register pgdata 246 f6h 0 0 0 0 0 0 0 0 ad converter control register adcon 247 f7h 0 0 0 0 0 0 0 0 ad converter data register(high byte) addatah 248 f8h x x x x x x x x ad converter data register(low byte) addatal 249 f9h 0 0 0 0 0 0 x x ad interrupt register adint 250 fah 0 0 0 0 0 0 0 0 carrier on/off control signal remcon 251 fbh ? ? ? ? ? ? ? 0 location fch is factory use only basic timer data register btcnt 253 fdh 0 0 0 0 0 0 0 0 location feh is not mapped interrupt priority register ipr 255 ffh x x x x x x x x

       5 /-(  !"# $ %# & $  ' #(  )*+ !"# $
, -,)-". **$## /" %# & $ # . 0 1 2  3    4 port 0 control high register p0conh 224 e0h 0 0 0 0 0 0 0 0 port 0 control low register p0conl 225 e1h 0 0 0 0 0 0 0 0 location e2h is not mapped. port 1 pull-up control register p1pur 227 e3h 0 0 0 0 0 0 0 0 port 1 control high register p1conh 228 e4h 0 0 0 0 0 0 0 0 port 1 control low register p1conl 229 e5h 0 0 0 0 0 0 0 0 port 2 control high register p2conh 230 e6h 0 0 0 0 0 0 0 0 port 2 control low register p2conl 231 e7h 0 0 0 0 0 0 0 0 port 3 control register p3con 232 e8h 0 0 0 0 0 0 0 0 location e9h is not mapped port 4 control register p4con 234 eah 0 0 0 0 0 0 0 0 key strobe control register kscon 235 ebh 0 0 0 0 0 0 0 0 locations ech ? efh are not mapped location f0h is factory use only. timer 1 control register t1con 241 f1h 0 0 0 0 0 0 0 0 timer 1 counter register(high byte) t1cnth 242 f2h 0 0 0 0 0 0 0 0 timer 1 counter register(low byte) t1cntl 243 f3h 0 0 0 0 0 0 0 0 timer 1 data register 1(high byte) t1data1h 244 f4h 1 1 1 1 1 1 1 1 timer 1 data register 1(low byte) t1data1l 245 f5h 1 1 1 1 1 1 1 1 timer 1 data register 2(high byte) t1data2h 246 f6h 1 1 1 1 1 1 1 1 timer 1 data register 2(low byte) t1data2l 247 f7h 1 1 1 1 1 1 1 1 timer 1 prescaler t1ps 248 f8h 0 0 0 0 0 0 0 0 locations f9h ? ffh are not mapped
 
   

    stop mode is invoked by the instruction stop (opcode 7fh). in stop mode, the operation of the cpu and all peripherals is halted. that is, the on-chip main oscillator stops and the supply current is reduced to less than 3 a. all system functions stop when the clock "freezes," but data stored in the internal register file is retained. stop mode can be released in one of two ways: by a reset or by interrupts.
 do not use stop mode if you are using an external clock source because x  input must be restricted internally to v  to reduce current leakage. #"-!  ) #  )6 )* stop mode is released when the reset signal is released and returns to high level: all system and peripheral control registers are reset to their default hardware values and the contents of all data registers are retained. a reset operation automatically selects a slow clock (1/16) because clkcon.3 and clkcon.4 are cleared to '00b'. after the programmed oscillation stabilization interval has elapsed, the cpu starts the system initialization routine by fetching the program instruction stored in rom location 0100h (and 0101h). #"-! - 0 $- - $$%6 ) #  )6 )* external interrupts with an rc-delay noise filter circuit can be used to release stop mode. which interrupt you can use to release stop mode in a given situation depends on the microcontroller's current internal operating mode. the external interrupts in the s3c8238/c8235/f8235 interrupt structure that can be used to release stop mode are: ? external interrupts p0.0-p0.7 (int0-nt7) please note the following conditions for stop mode release: ? if you release stop mode using an external interrupt, the current values in system and peripheral control registers are unchanged except 
$!"# $ . ? if you use an external interrupt for stop mode release, you can also program the duration of the oscillation stabilization interval. to do this, you must make the appropriate control and clock settings before entering stop mode. ? when the stop mode is released by external interrupt, the clkcon.4 and clkcon.3 bit-pair setting remains unchanged and the currently selected clock value is used. ? the external interrupt is serviced when the stop mode release occurs. following the iret from the service routine, the instruction immediately following the one that initiated stop mode is executed. #"-! - "- $- - $$%6 ) #  )6 )* activate any enabled interrupt, causing stop mode to be released. other things are same as using external interrupt. )7 ) - $ "- ) # )6 ,)* there are two ways to enter into stop mode. ? handling osccon register. ? handling stpcon register then writing stop instruction. (keep the order)

      idle mode is invoked by the instruction idle (opcode 6fh). in idle mode, cpu operations are halted while some peripherals remain active. during idle mode, the internal clock signal is gated away from the cpu, but all peripherals timers remain active. port pins retain the mode (input or output) they had at the time idle mode was entered. there are two ways to release idle mode: 1. execute a reset. all system and peripheral control registers are reset to their default values and the contents of all data registers are retained. the reset automatically selects the slow clock fxx/16 because clkcon.4 and clkcon.3 are cleared to ?00b?. if interrupts are masked, a reset is the only way to release idle mode. 2. activate any enabled interrupt, causing idle mode to be released. when you use an interrupt to release idle mode, the clkcon.4 and clkcon.3 register values remain unchanged, and the currently selected clock value is used. the interrupt is then serviced. when the return-from-interrupt (iret) occurs, the instruction immediately following the one that initiated idle mode is executed. 

       the s3c8238/c8235/f8235 microcontroller has five bit-programmable i/o ports, p0-p4. the port 3 and port 4 are 4-bit ports and the others are 8-bit ports. this gives a total of 32 i/o pins. each port can be flexibly configured to meet application design requirements. the cpu accesses ports by directly writing or reading port registers. no special i/o instructions are required. table 9-1 gives you a general overview of the s3c8238/c8235/f8235 i/o port functions. 
          0 1-bit programmable i/o port. schmitt trigger input or output mode selected by software; software assignable pull-up. p0.0-p0.7 can be used as inputs for external interrupts int0-int7 (with noise filter and interrupt control). 1 1-bit programmable i/o port. normal input, ad input and output mode selected by software; for p1.0-p1.3, push-pull or open-drain output mode can be selected by software; software assignable pull-up. alternatively p1.4-p1.7 can be used as pg0-pg3. 2 1-bit programmable i/o port. normal input, open-drain and push-pull output with software assignable pull-up. alternatively p2.0-p2.7 can be used as seg12-seg19. 3 1-bit programmable i/o port. push-pull output and schmitt trigger input with mode selected by software. p3.0-p3.3 can alternately be used as kin0-kin3. 4 1-bit programmable i/o port. push-pull output and normal input mode with software assignable pull-up. alternatively p4 can be used aspg4-pg7. 

    !"##!$%& $!  table 9-2 gives you an overview of the register locations of all five s3c8238/c8235/f8235 i/o port data registers. data registers for ports 0, 1, 2, 3, and 4 have the general format shown in figure 9-1. 
"!  ''( ! )' *'+ "+' ,- .+ !/ port 0 data register p0 224 e0h set 1, bank 0 r/w port 1 data register p1 225 e1h set 1, bank 0 r/w port 2 data register p2 226 e2h set 1, bank 0 r/w port 3 data register p3 227 e3h set 1, bank 0 r/w port 4 data register p4 228 e4h set 1, bank 0 r/w

   !0 port 0 is an 8-bit i/o port that you can use two ways: ? general-purpose i/o ? external interrupt inputs for int0-int7 ? alternative function port 0 is accessed directly by writing or reading the port 0 data register, p0 at location e0h in set 1, bank 0. 0 ! 10 ),20 ).3 port 0 pins are configured individually by bit-pair settings in two control registers located in set 1, bank 1: p0conl (low byte, e1h) and p0conh (high byte, e0h). when you select output mode, a push-pull circuit is configured. in input mode, three different selections are available: ? schmitt trigger input with interrupt generation on falling signal edges. ? schmitt trigger input with timer 1 capture signal. ? schmitt trigger input with interrupt generation on falling/rising signal edges. 0&$44!  10&)20)"3 to process external interrupts at the port 0 pins, two additional control registers are provided: the port 0 interrupt enable register p0int (e5h, set 1, bank 0) and the port 0 interrupt pending register p0pnd (e6h, set 1, bank 0). the port 0 interrupt pending register p0pnd lets you check for interrupt pending conditions and clear the pending condition when the interrupt service routine has been initiated. the application program detects interrupt requests by polling the p0pnd register at regular intervals. when the interrupt enable bit of any port 0 pin is ?1?, a rising or falling signal edge at that pin will generate an interrupt request. the corresponding p0pnd bit is then automatically set to ?1? and the irq level goes low to signal the cpu that an interrupt request is waiting. when the cpu acknowledges the interrupt request, application software must the clear the pending condition by writing a ?0? to the corresponding p0pnd bit.

     
     
   !" !# !$ !% !& !' ! ! !" ()")* !# ()#)+ !$ ()$),) !% ()%) !"!#- !")*()"     (./01 2- 1   /.)* ./3    (./01 ./ 3/.24   1   /. /3./ /./ (./01 )* ./34   !$!%- !#)+()#     (./01 2- 1   /.)+ ./ (./01 ./ 3/.24   1   /.)+ ./ /3./ /./ /3./ /./ !&!'- !$),)()$     (./01 2- 1   /. (./01 ./ 3/.24   1   /. /3./ /./ *   5 4/6 2),) !!- !%) ()%     (./01 2- 1   /. (./01 ./ 3/.24   1   /. /3./ /./ *   5 4/6 2) 
0,56( ! 10 ),3

    
 7   
   !" !# !$ !% !& !' ! ! !& ()& !' ()' ! () ! () !"!#- !&()&     (./01 2  /.    1 (./01 ./ 3/.2  /.4   1 (./01 2  /.- 1 /3./ /./ !$!%- !'()'     !&!'- !()     !!- !()     (./01 2  /.    1 (./01 ./ 3/.2  /.4   1 (./01 2  /.- 1 /3./ /./ (./01 2  /.    1 (./01 ./ 3/.2  /.4   1 (./01 2  /.- 1 /3./ /./ (./01 2  /.    1 (./01 ./ 3/.2  /.4   1 (./01 2  /.- 1 /3./ /./ 
0.6( ! 10 ).3

    ( /. 
 () $ 
   !" !# !$ !% !& !' ! ! ()" () 4 /    8   ( /.1 - ( /. - ()# ()$ ()% ()& ()' () () 
0& ! 10&)3 ( /. 1  
 9 # 
   !" !# !$ !% !& !' ! ! 9" 9 4 /    8   ( /. :/  . 1  . 1  - 6 7 7   ( /. :/  . 1  9# 9$ 9% 9& 9' 9 9 7
0&4! 10)"3

   !  port 1 is an 8-bit i/o port with individually configurable pins. port 1 pins are accessed directly by writing or reading the port 1 data register, p1 at location e1h in set 1, bank 0. p1.0?p1.7 can serve as inputs outputs (push pull or open-drain) or you can configure the following alternative functions: ? low-byte pins (p1.0-p1.3): ad0-ad3 ? high-byte pins (p1.4-p1.7): ad4-ad7, com4-com7, pg0-pg3   ! 1 ),2 ).3 port 1 has two 8-bit control registers: p1conh for p1.4?p1.7 and p1conl for p1.0?p1.3. a reset clears the p1conh and p1conl registers to ?00h?, configuring all pins to input mode. you use control registers settings to select input or output mode (push-pull or open drain) and enable the alternative functions. when programming the port, please remember that any alternative peripheral i/o function you configure using the port 1 control registers must also be enabled in the associated peripheral module.  !  $! 1 8!3 using the port 1 pull-up resistor enable register, p1pur (e3h, set 1, bank 1), you can configure pull-up resistors to individual port 1 pins.

     
    % 
   !" !# !$ !% !& !' ! ! !%*9% "; !"!#- !";&*9" %     (./01 *9"65   ./80  ./44 /3./ /./ %/./ -  *   5 4/6 8;&/./ !$!%- !#;'*9# $     !&!'- !$;*9$ #     !!- !%;*9% "     (./01 *9#65   ./80  ./44 /3./ /./ $/./ -  *   5 4/6 8;'/./ (./01 *9$65   ./80  ./44 /3./ /./ #/./ -  *   5 4/6 8;/./ (./01 *9%65   ./80  ./44 /3./ /./ "/./ -  *   5 4/6 8;/./ !$*9$ #; !#*9# $;' !"*9" %;&    / / ./ 0/- 6 4 ./ 3/.  6 /! 
 ,56( ! 1 ),3

    
 7  $ 
   !" !# !$ !% !& !' ! ! !*9 !"!#- !&*9&     (./01 *9& ./80  ./44 /3./ /./ . 31 /./ !$!%- !'*9'     !&!'- !*9     !!- !*9     (./01 *9' ./80  ./44 /3./ /./ . 31 /./ (./01 *9 ./80  ./44 /3./ /./ . 31 /./ (./01 *9 ./80  ./44 /3./ /./ . 31 /./ !*9 !'*9' !&*9&    / / ./ 0/- 6 4 ./ 3/.  6 /! 9
 .6( ! 1 ).3

    / 3/. 
 ,
 & 
   !" !# !$ !% !& !' ! ! !" , 4 /    8   / 3/.1 - / 3/. - !# !$ !% !& !' ! !   </6 - ./ 3/.  7   64 / 1  ./01 . 31 /./01 ! :
  ! 1 8!3

   ! port 2 is an 8-bit i/o port that can be used for general-purpose i/o and seg12-seg19. the pins are accessed directly by writing or reading the port 2 data register, p2 at location e2h in set 1, bank 0. to individually configure the port 2 pins p2.0?p2.7, you make bit-pair settings in two control registers located in set 1, bank 1: p2conl (low byte, e7h) and p2conh (high byte, e6h).  !  1 ),2 ).3 two 8-bit control registers are used to configure port 2 pins: p2conl (e7h, set 1, bank 1) for pins p2.0?p2.3 and p2conh (e6h, set 1, bank 1) for pins p2.4?p2.7. each byte contains four bit-pairs and each bit-pair configures one pin of port 2. ' 
   ' # 
   !" !# !$ !% !& !' ! ! '!%;#+)
$ !"!#- '!";=+)
>     (./01 (./01 ./ 3/. /3./ /./;=+ - +)
>/./ -  . 31 /./;=+ - +)
>/./ -  !$!%- '!#;>+)
"     !&!'- '!$;"+)
#     !!- '!%;#+)
$     (./01 (./01 ./ 3/. /3./ /./;>+ - +)
"/./ -  . 31 /./;>+ - +)
"/./ -  '!$;"+)
# '!#;>+)
" '!";=+)
> (./01 (./01 ./ 3/. /3./ /./;"+ - +)
#/./ -  . 31 /./;"+ - +)
#/./ -  (./01 (./01 ./ 3/. /3./ /./;#+ - +)
$/./ -  . 31 /./;#+ - +)
$/./ -  
,56( ! 1 ),3

    ' 
 7 ' " 
   !" !# !$ !% !& !' ! ! '!;'+)
 !"!#- '!&;$+)
%     (./01 (./01 ./ 3/. /3./ /./;$+ - +)
%/./ -  . 31 /./;$+ - +)
%/./ -  !$!%- '!';%+)
&     !&!'- '!;&+)
'     !!- '!;'+)
     (./01 (./01 ./ 3/. /3./ /./;%+ - +)
&/./ -  . 31 /./;%+ - +)
&/./ -  '!;&+)
' '!';%+)
& '!&;$+)
% (./01 (./01 ./ 3/. /3./ /./;&+ - +)
'/./ -  . 31 /./;&+ - +)
'/./ -  (./01 (./01 ./ 3/. /3./ /./;'+ - +)
/./ -  . 31 /./;'+ - +)
/./ -  
.6( ! 1 ).3

   !  port 3 is an 4-bit i/o port with individually configurable pins. port 3 pins are accessed directly by writing or reading the port 3 data register, p3 at location e3h in set 1, bank 0. p3.0?p3.3 can serve as inputs as push-pull outputs, or you can configure the following alternative functions: ? tacap, tack, taout, tapwm , watch timer, buzzer output and kin0-kin3 inputs   !  1 )3 a reset clears the p3con registers to ?00h?, configuring all pins to input mode. you use control registers settings to select input or output mode, and enable the alternative functions. when programming this port, please remember that any alternative peripheral i/o function you configure using the port 3 control registers must also be enabled in the associated peripheral module.

    & 
 & > 
   !" !# !$ !% !& !' ! ! &!)* )*,)+( !"!#- &!&,?+(&     (./01 2@    /. 6 0 -/aa /./ /3./ /./ *   5 01 2+(&+  ./2 4   1   /.   - /./  - +!"b./   3 0. 1 6 1/    5 1./ 13/.1/  - / !$!%- &!')**+(' @   !&!'- &!)*++( !!- &!)* )*,)+(     &!)*++( &!')**+(' &!&,?+(& (./01 2@    /.)** ./ /3./ /./ *   5 01 2+('   - /./  - +!"b./   3 0. 1 6 1/    5 1./ 13/.1/  - / (./01 2@    /. )* )*,)/./ /3./ /./ *   5 01 2+(   - /./  - +!"b./   3 0. 1 6 1/    5 1./ 13/.1/  - / @   (./01 2@    /.)** ./ /3./ /./ *   5 01 2+(   - /./  - +!"b./   3 0. 1 6 1/    5 1./ 13/.1/  - /  0
  ! 1 )3

   &( /. 
 &() " 
   !" !# !$ !% !& !' ! ! &!&+(& ( /.- 9 -  6  @   ( /.1 - ( /. - 24   1 ( /. - 2    1 &!'+(' &!+( &!+(    /7/ .  &   5 01     ./+(3+(& /5 6  4   1   /.! 
 & ! 1 &)3 &( /. 1  
 &9 > 
   !" !# !$ !% !& !' ! ! +(&  1   8     /.. 1   7  . 1  6  ( /. . 1  +(' +( +( / 1  
 &4! 1 )"3    
   
 

 
  
   
      !
  "

    !7 port 4 is an 4-bit i/o port with individually configurable pins. port 4 pins are accessed directly by writing or reading the port 4 data register, p4 at location e4h in set 1, bank 0. p4.0-p4.3 can serve as inputs (with or without pull-up), and output (open drain or push-pull). and they can serve as segment pins for lcd, and alternative function pg4- pg7 outputs. 7 !  17 )3 a reset clears the p4con registers to ?00h?, configuring all pins to input mode. % 
 % * 
   !" !# !$ !% !& !' ! ! %!;';%+)
= !"!#- %!&;'&;"+)
'     (./01 (./01 ./ 3/. /3./ /./;'&+ - +)
'/./ -  *   5 4/6 2;"/./ !$!%- %!';'';#+)
 !&!'- %!;';$+)
 !!- %!;';%+)
= %!;';$+)
 %!';'';#+)
 %!&;'&;"+)
'     (./01 (./01 ./ 3/. /3./ /./;''+ - +)
/./ -  *   5 4/6 2;#/./     (./01 (./01 ./ 3/. /3./ /./;'+ - +)
/./ -  *   5 4/6 2;$/./     (./01 (./01 ./ 3/. /3./ /./;'+ - +)
=/./ -  *   5 4/6 2;%/./ 
7 ! 17 )3

       
   
   you can use the basic timer (bt) in two different ways: ? as a watchdog timer to provide an automatic reset mechanism in the event of a system malfunction. ? to signal the end of the required oscillation stabilization interval after a reset or a stop mode release. the functional components of the basic timer block are: ? clock frequency divider (fxx divided by 4096, 1024 or 128) with multiplexer ? 8-bit basic timer counter, btcnt (set 1, bank 0, fdh, read-only) ? basic timer control register, btcon (set 1, d3h, read/write) 
 


    the basic timer control register, btcon, is used to select the input clock frequency, to clear the basic timer counter and frequency dividers, and to enable or disable the watchdog timer function. it is located in set 1, address d3h, and is read/write addressable using register addressing mode. a reset clears btcon to '00h'. this enables the watchdog function and selects a basic timer clock frequency of f  /4096. to disable the watchdog function, write the signature code '1010b' to the basic timer register control bits btcon.7?btcon.4. the 8-bit basic timer counter, btcnt (set 1, bank 0, fdh), can be cleared at any time during normal operation by writing a "1" to btcon.1. to clear the frequency dividers, write a "1" to btcon.0.

     
 
 
      ! " # $  %  & '(
 
)* &+  ,,  +  
('(

 - 
 
)* &+  ,,  +  
  
 .- /   )* &&+,00$&1" &+,00&%$ &+,00%2 + - ( 3( 
 ) )* &&+) 43( ,-  3
'- +5 ) 43( ,-   !"
!   

     
# $ 
%  &!'( !  you can program the basic timer overflow signal (btovf) to generate a reset by setting btcon.7?btcon.4 to any value other than "1010b". (the "1010b" value disables the watchdog function.) a reset clears btcon to "00h", automatically enabling the watchdog timer function. a reset also selects the cpu clock (as determined by the current clkcon register setting), divided by 4096, as the bt clock. the mcu is reseted whenever a basic timer counter overflow occurs, during normal operation, the application program must prevent the overflow, and the accompanying reset operation, from occuring, to do this, the btcnt value must be cleared (by writing a ?1? to btcon.1) at regular intervals. if a system malfunction occurs due to circuit noise or some other error condition, the bt counter clear operation will not be executed and a basic timer overflow will occur, initiating a reset. in other words, during the normal operation, the basic timer overflow loop (a bit 7 overflow of the 8-bit basic timer counter, btcnt) is always broken by a btcnt clear instruction. if a malfunction does occur, a reset is triggered automatically. ""! !)"*!  !+" !  you can also use the basic timer to program a specific oscillation stabilization interval following a reset or when stop mode has been released by an external interrupt. in stop mode, whenever a reset or an external interrupt occurs, the oscillator starts. the btcnt value then starts increasing at the rate of fxx/4096 (for reset), or at the rate of the preset clock source (for an external interrupt). when btcnt.4 overflows, a signal is generated to indicate that the stabilization interval has elapsed and to gate the clock signal off to the cpu so that it can resume normal operation. in summary, the following events occur when stop mode is released: 1. during stop mode, a power-on reset or an interrupt occurs to trigger the stop mode release and oscillation starts. 2. if a power-on reset occurred, the basic timer counter will increase at the rate of fxx/4096. if an interrupt is used to release stop mode, the btcnt value increases at the rate of the preset clock source. 3. clock oscillation stabilization interval begins and continues until bit 4 of the basic timer counter overflows. 4. when a btcnt.4 overflow occurs, normal cpu operation resumes.

       -
 . 4
6 
  .
 3  78( (-
 3 
9-
(  ):  
'- )$ ,3 )
 - 
 '
, 4 8; ,00$&1" <= ,00&%$ ,00%2 ,00 % & 
 
 

 >&&0000> ()   
 55
7 - 268. - 
  (6 ? 
3  78  =@ reset  ,"-$
 
  
     
  
  the 8-bit timer a is an 8-bit general-purpose timer/counter. timer a has three operating modes, you can select one of them using the appropriate tacon setting: ? interval timer mode (toggle output at taout pin) ? capture input mode with a rising or falling edge trigger at the tacap pin ? pwm mode (tapwm) timer a has the following functional components: ? clock frequency divider (fxx divided by 1024, 256, or 64 ) with multiplexer ? external clock input pin ( tack) ? 8-bit counter (tacnt), 8-bit comparator, and 8-bit reference data register (tadata) ? i/o pins for capture input (tacap) or pwm or match output (tapwm, taout) ? timer a overflow interrupt (irq0, vector e0h) and match/capture interrupt (irq0, vector deh) generation ? timer a control register, tacon (set 1, bank0, eah, read/write)  

   
 

   
   !" # the timer a module can generate two interrupts: the timer a overflow interrupt (taovf), and the timer a match/ capture interrupt (taint). taovf is interrupt level irq0, vector e0h. taint also belongs to interrupt level irq0, but is assigned the separate vector address, deh. a timer a overflow interrupt pending condition is automatically cleared by hardware when it has been serviced. a timer a match/capture interrupt, taint pending condition is also cleared by hardware when it has been serviced. $!%  the timer a module can generate an interrupt: the timer a match interrupt (taint). taint belongs to interrupt level irq0, and is assigned the separate vector address, deh. when timer a measure interrupt occurs and is serviced by the cpu, the pending condition is cleared automatically by hardware. in interval timer mode, a match signal is generated and taout is toggled when the counter value is identical to the value written to the ta reference data register, tadata. the match signal generates a timer a match interrupt (taint, vector deh) and clears the counter. if, for example, you write the value 10h to tadata and 0ah to tacon, the counter will increment until it reaches 10h. at this point, the ta interrupt request is generated, the counter value is reset, and counting resumes. %"&'"%!'" pulse width modulation (pwm) mode lets you program the width (duration) of the pulse that is output at the tapwm pin. as in interval timer mode, a match signal is generated when the counter value is identical to the value written to the timer a data register. in pwm mode, however, the match signal does not clear the counter. instead, it runs continuously, overflowing at ffh, and then continues incrementing from 00h. although you can use the match signal to generate a timer a overflow interrupt, interrupts are not typically used in pwm-type applications. instead, the pulse at the tapwm pin is held to low level as long as the reference data value is less than or equal to ( ) the counter value and then the pulse is held to high level for as long as the data value is greater than ( > ) the counter value. one pulse width is equal to t   256 . !'" in capture mode, a signal edge that is detected at the tacap pin opens a gate and loads the current counter value into the ta data register. you can select rising or falling edges to trigger this operation. timer a also gives you capture input source: the signal edge at the tacap pin. you select the capture input by setting the value of the timer a capture input selection bit in the port 3 control register, p3con, (set 1, bank 1, e8h). when p3conl.7.6 is 00, the tacap input or normal input is selected. when p3con.7.6 is set to 10, normal output is selected. both kinds of timer a interrupts can be used in capture mode: the timer a overflow interrupt is generated whenever a counter overflow occurs; the timer a match/capture interrupt is generated whenever the counter value is loaded into the ta data register. by reading the captured data value in tadata, and assuming a specific value for the timer a clock frequency, you can calculate the pulse width (duration) of the signal that is being input at the tacap pin.
 
  
  ' 
()   
# you use the timer a control register, tacon, to ? select the timer a operating mode (interval timer, capture mode and pwm mode) ? select the timer a input clock frequency ? clear the timer a counter, tacnt ? enable the timer a overflow interrupt or timer a match/capture interrupt ? clear timer a match/capture interrupt pending conditions tacon is located in set 1, bank 0 at address eah, and is read/write addressable using register addressing mode. a reset clears tacon to '00h'. this sets timer a to normal interval timer mode, selects an input clock frequency of fxx/1024, and disables all timer a interrupts. you can clear the timer a counter at any time during normal operation by writing a "1" to tacon.3. the timer a overflow interrupt (taovf) is interrupt level irq0 and has the vector address e0h. when a timer a overflow interrupt occurs and is serviced by the cpu, the pending condition is cleared automatically by hardware. to enable the timer a match/capture interrupt (irq0, vector deh), you must write tacon.1 to "1". to generate the exact time interval, you should write tacon.3 and .0, which cleared counter and interrupt pending bit. when interrupt service routine is served, the pending condition must be cleared by software by writing a ?0? to the interrupt pending bit. 
     
     ! "# "$ "% "& "' "( " "  )*)+ ,
,+ 
- -  ./- 
,+ .
- 
,+ 
+, ) ) ) 
-  .011(& .011(%$ .011$& .1 
 ) )2  + 
 3 ) 
-  .4
5  36 3 .+ , 3)+ ,

3 ) ,
,

78)
 )), .+ , 3)+ ,
0 
3 ) ,
,

78)
 )), .9! 378
,+ 
3 )* 
,+ )
 )),  ,3  50 :
,+ 
- -  ./-  50 :
,+ .
-  50 :
,+ ) ,
) -  . 00) .  * ) ,
 when write    *
 *) ,
) - "'  *;<- ) ,
) 3
3    ) 3,  ) =" *++,+-  %*  
#

   
 .( / )'   "*
9! 3 )*
 )
) ) ,
" ("9
3
-  ) 3 49/ "   ! )* "#<"$ 011(& 011(%$ 011$& 2 "( 9
3
 "' 50 : 78 9 6 9! 49/" "%"& "%"& / , ; / , ; ! 6 > ! 6 > ;<- 6+< ,
  3
= ;<-  +  ,00  /     3  ! 6 > " 9
3
 4 9? , +, 
 49/" *++,0- !%.%1 !*! 
 
  
     the s3c8238/c8235/f8235 micro-controller has an 8-bit counter called timer b. timer b, which can be used to generate the carrier frequency of a remote controller signal. timer b has two functions: ? as a normal interval timer, generating a timer b interrupt at programmed time intervals. ? to supply a clock source to the 16-bit timer/counter module, timer 1, for generating the timer 1 overflow interrupt. "$<"# 011 / ,   4
) 0 
"%<"& @@ *5 , 0 */   33
*;<- ) ,
:*
 * + 
 0 *   "
3 *
0,
30 : )), 
 *) ,
 *5 , 0 */  33: * *5 , 0 *;<- ) ,
"  :50 *
1 -  : )), *5 , 0 */   33: * *5 , 0 *;<- ) ,
"  , +, 9!):5= ,*5  9"<"aa
3     !"@@" ! 6 > 011( 011& 011; "(  2 ;< / :
 ,
 !6> /  :=    /  *=    + 
 4
,+ 
 " !6> "&<"% 4"? !" "' 9? , +, 
 6
30 : 68   *- )  ,)) ) 9"&9! 4 b 4 *++,2- .!%.%1 !*!

   
 
    / 
   ! "# "$ "% "& "' "( " "  3 ) 
-  .
<*  3 . + 
 3 
+, ) ) ) 
-  .011 .011( .011& .011; 
,+   ) 
-  .4
,+ 
/ ,
30 : .4
,+ 
/,
30 : .4
,+ 
/
3/ ,
30 : .4
5 3 
    +-  . +  .    
,+ 
- -  ./- 
,+ .
- 
,+  , +, 0 +<0 + )
 -  .<88 :/#
 
  
  / *<=   /  
   ! "# "$ "% "& "' "( " "  7 ,88* /  :<=   /  8 
   ! "# "$ "% "& "' "( " "  7 ,88* *++,4- .* 
00
    ! / 
   ! "# "$ "% "& "' "( " " =
 00 ." .9!  ,3 *++,5- !677 %*

   
     )''
) 8 *&  org 0000h vector 0deh,tamc_int vector 0e0h,taov_int org 0100h initial: ld sym,#00h ; disable global/fast interrupt sym ld imr,#00000010b ; enable irq0 interrupt ld sph,#00000000b ; set stack area ld spl,#00000000b ld btcon,#10100011b ; disable watch-dog ld tadata,#80h ld tacon,#01001010b ; match interrupt enable ; 3.28 ms duration (10 mhz x?tal) ei main: ? ? ? main routine ? ? ? jr t,mian tamc_int: ? ? ? interrupt service routine ? ? ? iret taov_int: .end
 
  
      )''
) 8 *& . org 0000h vector 0e2h,tbun_int org 0100h initial: ld sym,#00h ; disable global/fast interrupt ld imr,#00000010b ; enable irq0 interrupt ld sph,#00000000b ; set stack area ld spl,#00000000b ld btcon,#10100011b ; disable watch-dog sb1 ld p0conh,#00000011b ; enable tbpwm output sb0 ld tbdatah,#80h ld tbdatal,#80h ld tbcon,#11001110b ; enable interrupt ; duration 202 s (10 mhz x?tal) ei main: ? ? ? main routine ? ? ? jr t,mian tbun_int: ? ? ? interrupt service routine ? ? ? iret .end

   
  

  


   
     the 16-bit timer 1 is an 16-bit general-purpose timer/counter. timer 1 has three operating modes, one of which you select using the appropriate t1con setting. ? interval timer mode (toggle output at t1out pin) ? capture input mode with a rising or falling edge trigger at the t1cap pin timer 1 has the following functional components: ? clock frequency divider (fxx divided by 64, 8 or 1) with multiplexer ? external clock input pin (t1ck, tbuf) ? a 16-bit counter (t1cnth/l), a 16-bit comparator, and two 16-bit reference data register (t1data1, t1data2) ? i/o pins for capture input (t1cap), or match output (t1out) ? timer 1 overflow interrupt (irq2, vector e6h) and match/capture interrupt (irq2, vector e4h) generation ? timer 1 control register, t1con (set 1, f1h, bank 1, read/write)  

  

  
    
 !"
# $ the timer 1 module can generate two interrupts, the timer 1 overflow interrupt (t1ovf), and the timer 1 match/capture interrupt (t1int). t1ovf is interrupt level irq2, vector e6h. t1int also belongs to interrupt level irq2, but is assigned the separate vector address, e4h. a timer 1 overflow interrupt pending condition is automatically cleared by hardware when it has been serviced. a timer 1 match/capture interrupt, t1int pending condition is also cleared by hardware when it has been serviced. %!&'"!($ the timer 1 module can generate an interrupt: the timer 1 match interrupt (t1int). t1int belongs to interrupt level irq2, and is assigned the separate vector address, e4h. in interval timer mode, a match signal is generated and t1out is toggled when the counter value is identical to the value written to the t1 reference data register, t1data1h/l. the match signal generates a timer 1 match interrupt (t1int, vector e4h) and clears the counter. !'" in capture mode, a signal edge that is detected at the t1cap pin opens a gate and loads the current counter value into the t1 data register (t1data1h/l for rising edge, t1data2h/l for falling edge). you can select rising or falling edges to trigger this operation. timer 1 also gives you capture input source, the signal edge at the t1cap pin. you select the capture input by setting the value of the timer 1 capture input selection bit in the port 1 control register high, p1conh, (set 1 bank 0, e0h). when p1conh.7-.6 is 00 or 11, the t1cap input is selected . both kinds of timer 1 interrupts (t1ovf, t1int) can be used in capture mode, the timer 1 overflow interrupt is generated whenever a counter overflow occurs, the timer 1 capture interrupt is generated whenever the counter value is loaded into the t1 data register. by reading the captured data value in t1datah/l, and assuming a specific value for the timer 1 clock frequency, you can calculate the pulse width (duration) of the signal that is being input at the t1cap pin.

  

   '
 )
* 
$ you use the timer 1 control register, t1con, to ? select the timer 1 operating mode (interval timer, capture mode) ? select the timer 1 input clock frequency ? clear the timer 1 counter, t1cnth/l ? enable the timer 1 overflow interrupt or timer 1 match/capture interrupt ? clear timer 1 match/capture interrupt pending conditions t1con is located in set 1 and bank 1 at address f1h, and is read/write addressable using register addressing mode. a reset clears t1con to ?00h?. this sets timer 1 to normal interval timer mode, selects an input clock frequency of fxx/1024, and disables all timer 1 interrupts. to disable the counter operation, please set t1con.7-.5 to 111b. you can clear the timer 1 counter at any time during normal operation by writing a ?1? to t1con.3. the timer 1 overflow interrupt (t1ovf) is interrupt level irq2 and has the vector address e6h. to detect a match/capture or overflow interrupt pending condition when t1int or t1ovf is disabled, the application program should poll the pending bit tintpnd register, bank 0 e9h. when a ?1? is detected, a timer 1 match/capture or overflow interrupt is pending. when the sub-routine has been serviced, the pending condition must be cleared by software by writing a ?0? to the interrupt pending bit. if interrupt(match/capture or overflow) are enabled, the pending bit is cleared automatically by hardware.  
 
  

 

  ! "# $% &!" '!" ( ) * + , -  . 
/01
  
2 .3
 /01
 34 /01
 
#  

2 ...3055$ ..3055$6 ..3055$)+ .37 .53"8 53  

   

2 ..3/  .3 
0
   9 .3 


   9 3 
 :  9 
:$
 
2 .3
 
 34 
 
;
2 .300 3;<
 +,-& +$

  

  .)/ 0* 0' (<* ; ' 8 = ' 8 = +<
   )<
   "00 ;;)<
 ;;-)<
 !
:+<
 8 -  1
:: +<
   >- :$  ?

 >- /01 !&1+<
 055$ 055$6 055$)+ 7 "8 9  . +,  +, +,-!&.&1 !+!   
         
 
     

    !"     # $%   
  
 & '  ( #)#     
*      +#)#&     , % '$ 
   *$ #-    . / 
      (+0,  *  (  *$ - * $ 
   $   / #1# (  +0,*  (  $  $ '   !" 23#)#  
  * # #  *# #   #)#&  
   * # #  *# #     '     !" 23#)#  *   * # #  *# #       #)#&  
  * # #  *# # # $%   *
 #)#  
 # #  # &  # #     
 # # * #)# ;;- ;; +<,3. . .. .(<)3..

 ! ;; ;;- +<,3. . .. .(<)3
 !

  

        * 0''* 2+( org 0000h vector 0e4h,t1mc_int org 0100h initial: ld sym,#00h ; disable global/fast interrupt ld imr,#00000100b ; enable irq0 interrupt ld sph,#00000000b ; set stack area ld spl,#00000000b ld btcon,#10100011b ; disable watch-dog sb1 ld t1con,#01000110b ; enable interrupt ; duration 1.536 ms (10 mhz x?tal) ldw t1data1h,#0f0h ld t1ps,#00h ei main: ? ? ? main routine ? ? ? jr t,mian tbun_int: ? ? ? interrupt service routine ? ? ? iret .end

  

  


      
  watch timer functions include real-time and watch-time measurement and interval timing for the system clock. to start watch timer operation, set bit 1 and bit 6 of the watch timer mode register, wtcon.1 and .6, to "1". after the watch timer starts and elapses a time, the watch timer interrupt is automatically set to "1", and interrupt requests commence in 3.9ms, 0.25 s, 0.5s or 1.0s intervals. the watch timer can generate a steady 0.5khz, 1khz, 2 khz or 4 khz signal to the buzzer output. by setting wtcon.3 and wtcon.2 to "11b", the watch timer will function in high-speed mode, generating an interrupt every 3.91 ms. high-speed mode is useful for timing events for program debugging sequences. the watch timer supplies the clock frequency for the lcd controller (f  ). therefore,  
            . ? real-time and watch-time measurement ? using a main system or subsystem clock source ? clock source generation for lcd controller ? buzzer output frequency generator ? timing tests in high-speed mode

     !"# $%& '(  )*  )+  ),  )-  ).  )(  )/  )0 reset "0" "0" "0" "0" "0" "0" "0" "0" /.1/) 
  2  # &$"/340'(% 3 
 56  '6     wtcon.7 0 select (fxx/128 ) as the watch timer clock f2h 1 select subsystem clock as watch timer clock wtcon.6 0 disable watch timer interrupt 1 enable watch timer interrupt wtcon .5 - .4 0 0 0.5 khz buzzer (buz) signal output 0 1 1 khz buzzer (buz) signal output 1 0 2 khz buzzer (buz) signal output 1 1 4 khz buzzer (buz) signal output wtcon .3 - .2 0 0 set watch timer interrupt to 1.0s. 0 1 set watch timer interrupt to 0.5s. 1 0 set watch timer interrupt to 0.25s. 1 1 set watch timer interrupt to 3.91ms. wtcon.1 0 disable watch timer; clear frequency dividing circuits 1 enable watch timer wtcon.0 0 interrupt is not pending, clear pending bit when write 1 interrupt is pending     
   

    7! 
                      !"!#!$%"&'()*+,-.    
/
0 #!$&1234,-. % !5 06 3   134$,-   (4   &$,.   &'),. 
  &'),. * ' 1  ( +7 !#6 6!  869!/  : " ; 6!  #!$ !#6 %'&*$,-. %1&($,-. %(&$,-. %4&'$,-. '26 /.1/) 
  62 


        8! !897 2 
  org 0000h vector 0e8h,wt_int org 0100h initial: ld sym,#00h ; disable global/fast interrupt ld imr,#00100000b ; enable irq0 interrupt ld sph,#00000000b ; set stack area ld spl,#00000000b ld btcon,#10100011b ; disable watch-dog ld wtcon,#11001110b ; 0.5 khz buzzer/3.91ms duration interrupt (10 mhz x?tal) ei main: ? ? ? main routine ? ? ? jr t,mian tbun_int: ? ? ? and wtcon,#11111110b ; pending clear iret .end

  
       
   the s3f8325 micro-controller can directly drive an up-to-24-digit (24-segment) lcd panel. the lcd module has the following components: ? lcd controller/driver ? display ram (00h-17h) for storing display data in page 2 ? 24 segment output pins (seg0 - seg23) ? 8 common output pins (com0 - com7) ? 4 lcd operating power supply pins (v   ? v  ) bit settings in the lcd mode register, lmod, determine the lcd frame frequency, duty and bias, and the segment pins used for display output. when a subsystem clock is selected as the lcd clock source, the lcd display is enabled even during stop and idle modes. the lcd control register lcon turns the lcd display on and off and switches current to the charge-pump circuits for the display. lcd data stored in the display ram locations are transferred to the segment signal pins automatically without program control.   
            

  

  
                           
   
   
   
  !" #$ #$% #$& #$ #$ #$ #$ #$ #$ #$% #$& #$ #$ #$ #$ #$ #$ #$% #$& #$ #$ #$ #$ #$  '(    !" !"    )   *'    + ( '    , 
   

  
     ram addresses 00h-17h of page 2 are used as lcd data memory. when the bit value of a display segment is "1", the lcd display is turned on; when the bit value is "0", the display is turned off. display ram data are sent out through segment pins seg0-seg23 using a direct memory access (dma) method that is synchronized with the f   signal. ram addresses in this location that are not used for lcd display can be allocated to general-purpose use.  -+ -+ -+% -+% -+ -+ -+ -+ # #   -+ -+ -+% -+% -+ -+ -+ -+ %# #    %  
   !"#$%

  
     $&$ ' $&()*+ ,"
   " ' $&($% $&-   ! lcon.7-.5 000 0.90v (booster reference voltage ) 001 0.95v 010 1.00v 011 1.05v 100 1.10v 101 1.15v 110 1.20v 111 1.25v lcon.4 not used lcon.3-.2 00 off signal lcd dot on/off 01 on signal control bit 1x normal display lcon.1-.0 00 internal cap bias; display off (low signal output through com/seg) booster off 01 internal cap bias; display on (valid signal output through com/seg) 1x external resistor bias; booster off; display on (valid signal output through com/seg)   
    



 ! 
       
" #$

  
    $' $( the lcd mode control register lmod is mapped to ram addresses d1h. lmod controls these lcd functions: ? duty and bias selection (lmod.1-lmod.0) ? lcdck clock frequency selection (lmod.3-lmod.2) the lcd clock signal, lcdck, determines the frequency of com signal scanning of each segment output. this is also referred to as the 'frame frequency.' since lcdck is generated by dividing the watch timer clock (fw), the watch timer must be enabled when the lcd display is turned on. reset clears the lmod and lcon register values to logic zero. this produces the following lcd control settings: ? display is turned off ? lcdck frequency is the watch timer clock (fw)/2  = 256 hz the lcd display can continue to operate during idle and stop modes if a subsystem clock is used as the watch timer source. the lcd output voltage level is supplied by the voltage booster. ,"
  .  $-   ! lmod.7 0 seg20 - seg23 output disable 1 seg20 - seg23 output enable lmod.6 0 seg16 - seg19 output disable 1 seg16 - seg19 output enable lmod.5 0 seg12 - seg15 output disable 1 seg12 - seg15 output enable lmod.4 0 com4 - com7 output disable 1 com4 - com7 output enable ,"
 /#.  "0"'  1( $ ) '  1( ' $*( 2 #' $*
$( 23#' $*
$4( 00 : (fw) / 2  256 64 32 01 : (fw) / 2  512 128 64 10 : (fw) / 2  1024 256 128 11 : (fw) / 2  2048 512 256 

  
    . / ' 0 12 #   /
3   $ $% $& $ $ $ $ $ 45*. *00  6 . 07*5 $$ 
.45 
8 *0 
.45 
8 *0 9* 6 66:1;20  6 8  $$ <
  <
  <
  <
  474 *8
. 0*8 0  6 8 = 474. 0*8 474 *8 %)474 *8
. 0*8 0  6 8 = 474. 0*8 474 *8 &474 *8
. 0*8 0  6 8 = 474. 0*8 474 *8 474 *8
. 0*8 0  6 8 = 474. 0*8 474 *8 
 . " 

  
    15$-$6$ the lcd segment output pins(seg12-seg23) can also output key strobe signal for key scan and kin0-kin3 pins check key-press. when seg12-seg23 are set as key strobe output, selected key strobe is output pin by pin continuously with selected interval and duration. when kin# pins are set as an alternative mode, kin# pins status is high impedance normally, but when key strobe is output through seg# pins, kin# pins status become pull-up enable input mode. to decide which seg# pin output key strobe you should check p2 and p4 data register. if all seg12-seg23 are used as key strobe output, ksdata data register are used as one 12-bit data register. if seg16-seg23 are used as key strobe output, ksdata data register constains one number between 5 and 12. if seg20-seg23 are used as key strobe output, ksdata data register constains one number between 9 and 12. ksdata data register value is not changed until next strobe occurs. to decide which kin# pin receive key strobe you should check p3pnd register in interrupt routine. so, check ksdata data register and p3pnd register and you will get the key-press information.  >9>( *0.>6* $ ; 58 / ' 0 1;,2 #   *: /
3   $ $% $& $ $ $ $ $ -  *8 < 08 0* .' 1056?40*(  @4 652     (0 6166:2 (0 61%66:2 (0 61)%66:2 (0 61 66:2 ; 508 47470  6    9 a$a$ a$a$*.a$a$ a$a$*.a$a$ 8 .4*    &40 61$&66:2 %40 6166:2 ; 508  *8 8    ; 508 474. 0*8 ; 508 474 *8 ,40 .?  
 & 
7 1#, "    $ %& # '
  ( #
!   #  
))      
" #$ $  ! ( # #  
)*+   , -

.

"   $ $ /  
  #( #
!   )& ! 
   , -
/
.!    
  !&   ( #
!   )& ! 

"    $

  
    88$  the lcd display is turned on only when the voltage difference between the common and segment signals is greater than v  . the lcd display is turned off when the difference between the common and segment signal voltages is less than v  the turn-on voltage, + v  or - v  , is generated only when both signals are the selected signals of the bias. table 14-7 shows lcd drive voltages for static mode, 1/3 bias, and 1/4 bias. ,"
 98"8" ':"  - ( 6;!!"# . 2-  2 -  v  v  ? v  v 
? v  3/4 v  v  ? 2/3 v  2/4 v  v  ? 1/3 v  1/4 v  v 0 v 0 v 0 v   & +0 # #!  

 0"  & ! ' &       " $&

'#
" & +0 '&1" $ 2 $&  the 24 lcd segment signal pins are connected to corresponding display ram locations at 00h-17h. bits 0-7 of the display ram are synchronized with the common signal output pins com0, . . . . , and com7. when the bit value of a display ram location is "1", a select signal is sent to the corresponding segment pin. when the display bit is "0", a 'no-select' signal is sent to the corresponding segment pin. each bias has select and no-select signals.  6:   6 ,  6                  b*( 
< "2&
"- "  !"#. 

  
     6:   6 ,  6 b*(     
      
         
     
  
4 "2&
"- " 2 #)2-  !"#.  6:   6 ,  6 b*(     
      
         
     
          
3 "2&
"- " 23#)2 -  !"#.

  
    4866: % #c $&66: ; 508 a447 *8 ; 5 74 *8 ; 5 746? 6: 66: a447 *8 ; 5 74 *8 ; 5 746? 6: 
= 1#! >0/1#,$

  
     6: b*(  
      
      1a$2 +08 1.4* 2 008 ;+ +   *  1a$2  
       
      1a$2 008 ;+ .08 ;+ .08 ;+ ?08 ;+ 3? ? 7 47408 ? 07 (40(* * ? '?0*40 *?4'?474 0? '?$ 
* :!"?1#,.;>2 #$!   /2 *$3)

"   )$4)$

"
      
! '
,$5
(.'& 2 011
!  6   !
$,.  

  
                    b/    $9     
 
  !    & % b*(   & %    
        
        
   
      $%9% $9   $9    "   # $     % &     "   # $ 
 
  !                         
        
        
        
   
            
   
            
   
    
  ".@9 :!"23#)2 -  !"#. 

  
    b*(               b/    $9    
 
  !        
      
   
   $9 $9  $9    "   # $        "   # $ 
 
 "!          
      
      
      
      
   
        
   
        
   
     "   # $                                     "   # $ " 
 
 "! 
 
" "#! 
  " .@9 :!"2 #)2-  !"#.

  
    8$ 8&+$ -#8"-  for run the voltage booster ? make enable the watch timer for f  ? set lcon.1-.0 to "01" for make enable voltage booster ? recommendable capacitance value is 0.1 uf (ca/b, c1, c2, c3, c4) -#8"9.   ':""#( for make external voltage dividing resistors ? set lcon.1-.0 to "1x" for make disable voltage booster ? make floating the ca and cb pin ? recommendable r = 100 kohm      
   9/ / 
 *01  *  &2 / /      
   / / / / 
 *01  *  &2   /      
   / 
 *01  &*  &2 / / * 61  &*  &2      
     /  847 6 6 a8 *0   6?*7 %  *' 80 $ 
 8"9.   

  
        6$&6a >  !"# org 100h initial: ld sym,#00h ; disable global/fast interrupt ld imr,#00000000b ; enable irq7 interrupt ld btcon,#10100001b ; disable watchdog ld clkcon,#00011000b ; select non-divided oscillator frequency ld spl,#0 ; set spl ld sph,#0 sb1 ld p1conh,#10101010b ; enable com signal output ld p2conh,#10101010b ; enable seg16-seg19 ld p2conl,#10101010b ; enable seg12-seg15 ld p4con,#10101010b ; enable seg20-seg23 sb0 ld wtcon,#11000010b ld lcon,#11101001b ld lmod,#11111100b ; lcd ram clear routine........area: page 00h-17h ld r0,#17h lcd_clr ld pp,#20h ld @r0,#0 djnz r0,lcd_clr ld r0,#0 ld pp,#00h ei

  
        6$&6a >  !"#' .( << main routine >> main: ldw rr4,#0 ld r2,#0 ldc r3,#dsp_dat[rr4] dsp_loop: ld r6,r2 ld pp,#20h ld @r6,r3 ld pp,#00 inc r2 incw rr4 idc r3,#dsp_dat[rr4] cp r2,#17h jp ule,dsp_loop jp main dsp_dat: db 0,26h,49h,49h,32h,7fh,8h,34h,43h,0,41h db 7fh,41h,0h,0h,7fh,41h,41h,22h,1ch,0,0,0,0,0,0 .end

  
        6!a > 1#,. !"# org 0000h vector 0feh,key_int org 0100h initial: ld sym,#00h ; disable global/fast interrupt ld imr,#10000000b ; enable irq0 interrupt ld sph,#00000000b ; set stack area ld spl,#00000000b ld btcon,#10100011b ; disable watchdog sb1 ld p1conh,#10101010b ; enable com signal output ld p2conh,#10101010b ; enable seg signal output ld p2conl,#10101010b ; enable seg signal output ld p4con,#10101010b ; enable seg signal output ld p3con,#11111111b ; enable key strobe input sb0 ld p3int,#10101010b ; key input falling edge int. ld wtcon,#10001110b ; clock generation for lcd display ld lcon,#01001101b ; cap bias, enable lcd display ld lmod,#11111000b ; 1/8duty & 1/4bias sb1 ld kscon,#10011111b ; all ports are used as key strobe sb0 ; lcd ram clear routine.... area : page2 00h-17h ld r0,#17h lcd_clr: ld pp,#20h ld @r0,#0 djnz r0,lcd_clr ld @r0,#0 ld pp,#00h clr r0 clr r1 clr r6 ei

  
        6!a > 1#,. !"#' .( main: nop nop nop clr r6 clr r1 ld r4,#0 dsp_loop: ld r5,r0 add r5,r1 ldc r3,#dsp_dat[rr4] ld pp,#20h ld @r6,r3 ld pp,#00 inc r1 inc r6 cp r1,#24 jp ult,dsp_loop jr t,main dsp_dat db 080h,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 db 22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39 db 40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59 db 60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80

  
        6!a > 1#,. !"#' .( key_int: push pp ld pp,#00h ld r0,ksdata and r0,#00001111b ; mask high 4-bit of ksdata tm p3pnd,#00000001b ; check kin0 jp nz,key_int_kin0 tm p3pnd,#00000010b ; check kin1 jp nz,key_int_kin1 tm p3pnd,#00000100b ; check kin2 jp nz,key_int_kin2 jp key_int_kin3 key_int_kin0: add r0,#0 jp what_key key_int_kin1: add r0,#12 jp what_key key_int_kin2: add r0,#24 jp what_key key_int_kin3: add r0,#36 jp what_key what_key: ld p3pnd,#00b ; pending clear pop pp iret .end

  
     


       
   
   the 10-bit a/d converter (adc) module uses successive approximation logic to convert analog levels entering at one of the eight input channels to equivalent 10-bit digital values. the analog input level must lie between the av  and av  values. the a/d converter has the following components: ? analog comparator with successive approximation logic ? d/a converter logic (resistor string type) ? adc control register (adcon) ? ad interrupt register(adint) ? eight multiplexed analog data input pins (ad0 - ad7) , alternately digital data i/o port ? 10-bit a/d conversion data output register (addatah/l) ? av  and av  pins, av  is internally connected to v  

   
 to initiate an analog-to-digital conversion procedure, at the first you must set port control register(p1conh/l) for ad analog input. and you write the channel selection data in the a/d converter control register adcon.4-.6 to select one of the eight analog input pins (ad0-7) and set the conversion start or enable bit, adcon.0. the read- write adcon register is located in set 1, bank 1, at address f7h. the unused pin can be used for normal i/o. during a normal conversion, adc logic initially sets the successive approximation register to 200h (the approximate half-way point of an 10-bit register). this register is then updated automatically during each conversion step. the successive approximation block performs 10-bit conversions for one input channel at a time. you can dynamically select different channels by manipulating the channel selection bit value (adcon.6 - 4) in the adcon register. to start the a/d conversion, you should set the enable bit, adcon.0. when a conversion is completed, adint.0, the end-of-conversion(eoc) bit or pending bit is automatically set to 1 and the result is dumped into the addatah/l register where it can be read. the a/d converter then enters an idle state. remember to read the contents of addatah/l before another conversion starts. otherwise, the previous result will be overwritten by the next conversion result.  because the a/d converter has no sample-and-hold circuitry, it is very important that fluctuation in the analog level at the ad0-ad7 input pins during a conversion procedure be kept to an absolute minimum. any change in the input level, perhaps due to noise, will invalidate the result. 
 


  
  


 


 
   !"  . you must use stop or idle mode after adc operation is finished.

     #$%&' the a/d conversion process requires 4 steps (4 clock edges) to convert each bit and 10 clocks to set-up a/d conversion. therefore, total of 50 clocks are required to complete an 10-bit conversion: when fxx/8 is selected for conversion clock with an 8 mhz fxx clock frequency, one clock cycle is 1 us. each bit conversion requires 4 clocks, the conversion rate is calculated as follows: 4 clocks/bit 10 bits + set-up time = 50 clocks, 50 clock 1us = 50 us at 1 mhz !"#$%%#%%'%(!#)  the a/d converter control register, adcon, is located at address f7h in set 1, bank 0. it has three functions: ? analog input pin selection ( bits 4, 5, and 6 ) ? adc interrupt enable ( bit 3) ? a/d operation start or enable ( bit 0 ) ? a/d conversion speed selection (bit 1,2) after a reset, the start bit is turned off. you can select only one analog input channel at a time. other analog input pins (adc0?adc7) can be selected dynamically by manipulating the adcon.4?6 bits. and the pins not used for analog input can be used for normal i/o function. 


  
     ! " "# "$ "% "& "' " "  () *+
  

,- - . /- 0
  / 
0
 1 2* 
  * * - .     344# 3445 344% 344 *
 6 "'" 
10  - - . /- 
10 /,- 
10 01 0 * - .           ' & % $ #  "#"$"% 01 0 *  
+,-+.!"#

#%
 
(!#)

     
7
10  
78     ! " "# "$ "% "& "' " "  1 9 7
10 0 9- 
, / 
10 0 9: 
9 0 = clear pending bit (when write) /7
10 0 9: 
9 *  
+,-/.!"#
 
 %
 
(!) 
  
:) 8 5  9) )  ! " "# "$ "% "& "' " " 
  
 () 8  ;  9) )  !444444"" *  
+,-0.!"#

%
 
(!!!1") %!%*%#$!'$ in the adc function block, the analog input voltage level is compared to the reference voltage. the analog input level must remain within the range av  to av  (usually, av   = v  ). different reference voltage levels are generated internally along the resistor tree during the analog conversion process for each conversion step. the reference voltage level for the first conversion bit is always 1/2 av  .

        701 < 2 <"2<" 2- 
1  9 9  
   
878" ,  =  =    >0
 
"%2"  *  01 03 :  9 " ,-  " 
 -  "'2" ! 1  0 4
? 2  *  * 
1**  00
4>  * 2-  


 1 5;  7 @# "& 8  *  
+,-2.!"#

*   3  

           45 
!#
  org 0000h vector 0fah,adc_int org 0100h initial: ld sym,#00h ; disable global/fast interrupt ld imr,#01000000b ; enable irq0 interrupt ld sph,#00000000b ; set stack area ld spl,#00000000b ld btcon,#10100011b ; disable watch-dog sb1 ld p1conh,#01010101b ; adc input ld p1conl,#01010101b ; adc input sb0 ld adcon,#00001001b ; enable adc interrupt ld r4,#0 ei main: ? ? ? main routine ? ? ? jr t,mian tbun_int: ; hardware pending clear ? ? ? ? ? ? or adcon,#00000001b ; resume conversion iret .end

           45 
!#& %  
 org 0000h org 0100h initial: ld sym,#00h ; disable global/fast interrupt ld imr,#01000000b ; enable irq0 interrupt ld sph,#00000000b ; set stack area ld spl,#00000000b ld btcon,#10100011b ; disable watch-dog sb1 ld p1conh,#01010101b ; adc input ld p1conl,#01010101b ; adc input sb0 ld adcon,#00000000b ; disable adc interrupt ld r4,#0 ei main: nop or adcon,#00000001b ; conversion start nop nop nop ad_loop: tm adint,#00000001b ; check eoc jp z,ad_loop ld adint,#0 ; pending clear by software ld r0,addatah nop nop nop jr t,main .end

         
    this voltage booster works for the power control of lcd: generates 4 x v  (v  ), 3 x v  (v  ), 2 x v  (v  ), 1 x v  (v  ). this voltage booster allows low voltage operation of lcd display with high quality. this voltage booster circuit provides constant lcd contrast level even though battery power supply was lowered. this voltage booster include voltage regulator, and voltage charge/pump circuit. 

   
 the voltage booster has built for driving the lcd. the voltage booster provides the capability of directly connecting an lcd panel to the mcu without having to separately generate and supply the higher voltages required by the lcd panel. the voltage booster operates on an internally generated and regulated lcd system voltage and generates a doubled , a tripled and a four-fold voltage levels to supply the lcd drive circuit. external capacitor are required to complete the power supply circuits. the vdd power line is regulated to get the v  (v  ) level, which become a base level for voltage boosting. then a doubled ,a tripled and a four-fold voltage will be made by capacitor charge and pump circuit.

            

                   
             

!" # #$ %&' %&'                        ()**+* *,*)-**.-/*0)*.*, ))-**,*,*)**+* *,*.-   *0)*.*,*0)-

   

      
     !"  #$   % supply voltage v  -0.3 ? 6.5 v operating temperature range t  -40 ? +85 c storage temperature range t 
-65 ? +150 c 
   & (t  = 25 c, v  = 2.0 v to 5.5 v, v  = 0 v)  #$   '  ! $ ! % operating voltage v  2.0 ? 5.5 v regulated voltage v  connect 1 m ? load between v  and v  0.85 1.05 1.30 booster voltage v  connect 1 m ? load between v  and v   2v  x 0.9 ? 2v  x 1.1 v  connect 1 m ? load between v  and v   3v  x 0.9 ? 3v  x 1.1 v  connect 1 m ? load between v  and v   4v  x 0.9 ? 4v  x 1.1 

     
  

 
         
   the s3c8238/c8235/f8235 micro-controller has a built-in vld(voltage level detector) circuit which allows detection of power voltage drop through software. turning the vld operation on and off can be controlled by software. because the ic consumes a large amount of current during vld operation. it is recommended that the vld operation should be kept off unless it is necessary. also the vld criteria voltage can be set by the software. the criteria voltage can be set by matching to one of the 3 kinds of voltage 2.4v, 3.3v or 4.5v (vdd reference voltage). the vld block works only when vldcon.2 is set. if vdd level is lower than the reference voltage selected with vldcon.1-.0, vldcon.3 will be set. if vdd level is higher, vldcon.3 will be cleared. please do not operate the vld block for minimize power current consumption. 

            
           


    ! ! ! 
   
" ! 
 

  #  
  $# % &'() (* +(,- )* .)* / 0         
   

 
      
 
       1 
 
)  #  #  #  #   )  !


    ! 

 
       "#$% % % %"%"" %$&'"%  the bit 2 of vldcon controls to run or disable the operation of voltage level detector. basically this v  is set as 2.4 v by system reset and it can be changed in 3 kinds voltages by selecting voltage level detector control register(vldcon). when you write 2 bit data value to vldcon, an established resistor string is selected and the v  is fixed in accordance with this resistor. table 17-1 shows specific v  of 3 levels.   *2321   4! 
 # 5' 

  #  
&'() (* +(,-( 6' )* .)* / 0         7 8 # 9       *  : 
, 
      
   !( ")
   ( !  
*   0 0 2.4 v 0 1 not used 1 0 3.3 v 1 1 4.5 v    
   

 
      ")
 +   ! (t  = 25 c) , '-) ( . "-/ .0 1 operating voltage v  1.5 ? 5.5 v detection voltage v  vldcon.1.0 = 00b 2.0 2.4 2.8 vldcon.1.0 = 01b not used vldcon.1.0 = 10b 2.9 3.3 3.7 vldcon.1.0 = 11b 4.1 4.5 4.9 current consumption i  vld on v  = 5.5 v ? 10 20 ua v  = 3.0 v 5 10 v  = 2.0 v 4 8 hysteresis voltage ? v vldcon.1.0 = 00b ? 10 100 mv (slew rate of vld) vldcon.1.0 = 11b

 
          ,"/21+  ! org 0000h org 0100h initial: sb0 ld sym,#00h ; disable global/fast interrupt sym ld imr,#00h ; enable irq0 interrupt ld sph,#00h ; high byte of stack pointer sph ld spl,#00h ; low byte of stack pointer spl ld btcon,#10100011b ; disable watch-dog ld clkcon,#00011000b ; non-divided ld vldcon,#00000100b ; set 2.4 v ei main: nop nop tm vldcon,#00001000b ; if v  is lower than the reference voltage ; vldcon.3 bit is set jp nz,low_vdd nop nop jr t,nain low_vdd: ? ? ? jr t,main .end

 
       


          

  

 you can output up to 8-bit through p1.4-p1.7 and p4.0-p4.3 by tracing the following sequence. first of all, you have to change the pgdata into what you want to output. and then you have to set the pgcon to enable the pattern generation module and select the triggering signal. from now, bits of pgdata are on the p1.4-p1.7 and p4.0-p4.3 whenever the selected triggering signal happens.  
  
     

 !

  

        "# $$ #%&'( )
  * +  ,(
) -./!%!"0!,&' *%"  1 .   2    + "2#
  +3 #
  3 4 4 4"+$  44 %&'4 +
  4 + 3      
!  1 .   2  
"$$
 (%!"0!-1/) %&' 4 4 4"+$  44

2



1
.
  1 .   2   "#$%

            %%&'() org 0000h org 0100h initial: sb0 ld sym,#00h ; disable global/fast interrupt sym ld imr,#00h ; enable irq0 interrupt ld sph,#00h ; high byte of stack pointer sph ld spl,#00h ; low byte of stack pointer spl ld btcon,#10100011b ; disable watch-dog ld clkcon,#00011000b ; non-divided sb1 ld p1conh,#11111111b ; enable pg output ld p4con,#11111111b ; enable pg output sb0 ei main: nop nop or pgcon,#00001000b ; triggering then pattern data are output nop nop jr t,nain .end

         



          in this chapter, s3c8238/c8235 electrical characteristics are presented in tables and graphs. the information is arranged in the following order: ? absolute maximum ratings ? input/output capacitance ? d.c. electrical characteristics ? a.c. electrical characteristics ? oscillation characteristics ? oscillation stabilization time ? data retention supply voltage in stop mode ? a/d converter electrical characteristics


       
    (t  = 25 c)          supply voltage v  ? 0.3 to +6.5 v input voltage v  ? 0.3 to v   + 0.3 output voltage v  ? 0.3 to v  + 0.3 output current high i  one i/o pin active ? 18 ma all i/o pins active ? 60 output current low i  one i/o pin active +30 total pin current for port +100 operating temperature t  ? 40 to + 85 c storage temperature t  ? 65 to + 150  


 !!"! !  (t   = -40  c to + 85 c, v  = 2.0 v to 5.5 v)         #   operating voltage v  f
= 10 mhz 2.7 ? 5.5 v f
 = 4 mhz 2.0 5.5 input high voltage v  all input pins except v  0.8 v  v  v  x   xt  v  -0.1 input low voltage v  all input pins except v  ? 0.2 v  v  x   xt  0.1 
 
  
  


      


 !!"! ! $ % (t   = -40  c to + 85  c, v  = 2.0 v to 5.5 v)         #   output high voltage v  v   = 2.4 v; i  = -4 ma port 0.4 only v  - 0.7 v  - 0.3 ? v v  v   = 5 v; i  = -4 ma port 3 v  - 1.0 ? ? v  v   = 5 v; i  = -1 ma all output pins except p0.4,p3 v  - 1.0 ? ? output low voltage v  v  = 2.4 v; i  = 12 ma p0.4 only 0.3 0.5 v  v  = 5 v; i  = 15 ma p3 0.4 2.0 v  v  = 5 v; i  = 4 ma all output pins except p0.4,p3 ? 0.4 2.0 input high leakage current i  v  = v  all input pins except i  ? ? 3 a i  v  = v  x   xt  20 input low leakage current i  v   = 0 v all input pins except i  ? ? -3 i  v   = 0 v, x   xt  -20 output high leakage current i  v    = v  all i/o pins and output pins ? ? 3 output low leakage current i  v    = 0 v all i/o pins and output pins ? ? -3 oscillator feed back resistors r 
v   = 5.0 v t   = 25 c x   = v  , x    = 0 v 800 1000 1200 k ? pull-up resistor r  v   = 0 v; v   = 5 v 10 % port 0,1,2,4 t  = 25 c 25 50 100 r  v   = 0 v; v  = 5 v 10% t  =25 c,  only 110 210 310 com output voltage deviation v 
v  = v 
 = 4 v (v 
 -comi) io = 15 p- a (i = 0-3) ? 60 200 mv seg output voltage deviation v  v  = v 
 = 4 v (v 
 -segi) io = 15 p- a (i = 0-23) ? 60 200


       


 !!"! ! $ !% (t   = -40 c to + 85 c, v  = 2.0 v to 5.5 v)         #   supply current    i   v   = 5 v  10 % 10 mhz crystal oscillator ? 12 25 ma 4 mhz crystal oscillator 4 10 v   = 3 v  10 % 10 mhz crystal oscillator 3 8 4 mhz crystal oscillator 1 5 i  idle mode: v  = 5 v  10 % 10 mhz crystal oscillator 3 10 4 mhz crystal oscillator 1.5 4 idle mode: v  = 3 v  10 % 10 mhz crystal oscillator 1.2 3 4 mhz crystal oscillator 1.0 2.0 i  sub operating: main-osc stop v   = 3 v  10 % 32768 hz crystal oscillator 40 80 a i  sub idle mode: main osc stop v   = 3 v  10 % 32768 hz crystal oscillator 7 14 i  main stop mode : sub-osc stop v   = 5 v  10 % 1 3 v   = 3 v  10 % 0.5 2 
   

 
 
   
 
   
!
 
  "      

  # $  
       

 


  
  %  
 $  
  % 
 

 

&'(
$ 
)

)


  
  *    
 


 $  
  %   +(
$ 
, 
)
 
 "(++( - #
&(.
  


/
#
0$
1 "2


      &


 !!"! !  (t   = -40  c to +85  c, v  = 2.0 v to 5.5 v)         #   interrupt input high, low width (p0.0?p0.7) t  , t  p0.0?p0.7, v  = 5 v 200 ? ? ns  input low width t  v  = 5 v 1.5 ? ? s 
  3
 %

 
)

)
           ' 
(#)  (# $  *% reset     ' 
(#)   


       +
(#,-##!! (t   = -40  c to +85  c, v  = 0 v )         #   input capacitance c  f = 1 mhz; unmeasured pins are returned to v  ? ? 10 pf output capacitance c   i/o capacitance c   .
 ##/  #  (t  = -40  c to + 85  c)         #   data retention supply voltage  v    2 ? 5.5  v data retention supply current i  v   = 2 v ? ? 3 a 
              
       
!  
 "
#

 

 reset   
 
  $

%&' (' ()    ' &
 #  (   


     
           


#

 

   
  !  
 "
      
  
 
  $

%&' (' *  + ' +
 # $% ((#  
           


#

 

   
  !  
 "
      
  
 
 ,( (' -()./'0,'1  ' .
 # $ % ((# 


       0
 , 1 !!"! !  (t   = - 40  c to +85 c, v  = 2.0 v to 5.5 v, v  = 0 v)         #   resolution ? 10 ? bit total accuracy v  = 5.12 v ? ? 3 lsb integral linearity error ile av  = 5.12v ? ? 2 differential linearity error dle av  = 0 v cpu clock = 10 mhz ? ? 1 offset error of top eot ? 1 3 offset error of bottom eob ? 0.5 2 conversion time   t
 10-bit resolution 50 x fxx/4, fxx = 10mhz 20 ? ? s analog input voltage v  ? av  ? av  v analog input impedance r  ? 2 1000 ? m ? analog reference voltage av  ? 2.5 ? v  v analog ground av  ? v  ? v  +0.3 analog input current i  av  = v  = 5v ? ? 10 a analog block current  i 
av  = v  = 5v ? 1 3 ma av  = v  = 3v 0.5 1.5 av  = v  = 5v when power down mode 100 500 na 
   4')

4 


5
# 

 )

   
  "  
 
 
 6 )
  


       (. 



"
    2  2  2#342#3/   3 (( 3 2"    (5 
 $
6 77 " 


 8 $9
 1( $ 
   
:$
 
  68 
  .;* ' 0
!  , 1!) 2"    !!!


       3
- ! '4!$)  % (t  = -40  c to +85 c, v   = 2.0 v to 5.5 v) - !   !5!      #   crystal <  3( 3 <  crystal oscillation frequency 1 ? 10 mhz ceramic <  3( 3 <  ceramic oscillation frequency 1 ? 10 external clock <  <  x  input frequency 1 ? 10 rc <  <   r = 35 k ? , v  = 5 v  2   6
- !  !57 $  % (t   = -40  c to +85  c, v  = 2.0 v to 5.5 v) - !       #   crystal v  = 4.5 v to 5.5 v ? ? 10 ms v  = 2.0 v to 4.5 v 30 ceramic stabilization occurs when v  is equal to the minimum oscillator voltage range. ? ? 4 external clock x  input high and low level width (t  , t  ) 50 ? ? ns 
  7  $8
/  2 


5
# 
'3  %
       #
5
 #

   

 

$.990 


     <      ()     41 % ' 3
 !5 8   
- ! '4!$)  % (t  = -40  c + 85  c, v   = 2.0 v to 5.5 v) - !   !5!      #   crystal 3( 3 <  <  c1 = 33 pf, c2 = 33 pf 32 32.768 35 khz  *
- ! $! %7 $  % (t   = 25  c, v   = 2.0 v to 5.5 v))      #   v  = 4.5 v to 5.5 v ? 250 500 ms v  = 2.0 v to 4.5 v ? ? 2 s 
  7  $8
/  2 


5
# 
'3
   


    


$
  


       
  !"! !    ( t  = ? 40 c + 85 c, v  = 2.0 v to 5.5 v)         #   liquid crystal v 
connect a 1m ? lcon.7-.5 = 0 typ. 0.90 typ. v drive voltage load resistance lcon.7-.5 = 1 x 0.9 0.95 x 1.1 between v  and lcon.7-.5 = 2 1.00 v 
 lcon.7-.5 = 3 1.05 (no pannel load) lcon.7-.5 = 4 1.10 lcon.7-.5 = 5 1.15 lcon.7-.5 = 6 1.20 lcon.7-.5 = 7 1.25 v 
 connect a 1mohm load resistance between v  and v 
  (no panel load) 2 x v 
 x 0.9 ? 2 x v 
 x 1.1 v 
 connect a 1mohm load resistance between v  and v 
  (no panel load) 3 x v 
 x 0.9 ? 3 x v 
 x 1.1 v 
 connect a 1mohm load resistance between v  and v 
  (no panel load) 4 x v 
 x 0.9 ? 4 x v 
 x 1.1 vld voltage vldcon.1-.0 = 00b 2.3 2.4 2.5 vldcon.1-.0 = 01b 2.6 2.7 2.8 vldcon.1-.0 = 10b 3.2 3.3 3.4 vldcon.1-.0 = 11b 4.4 4.5 4.6 vld circuit response time tb fw = 32.768khz ? ? 1.0 ms vld operating current ibl ? ? ? 10 a voltage regulator and booster consumed current ivb v  = 3.0v lcon.7-.5=4-7 display on with capacitor bias ? 5.0 10 
     
  
: ? 
    




 $/( 
( 
 2
0
)
# ( 
 /;"*2 


$( 
 

 



      
9/$9 :/  %!"! !          #   lvr voltage high v  2.4 2.8 4.0 v lvr voltage low v  2.0 2.4 3.2 2.2 2.6 3.6 2.4 2.8 4.0 power supply voltage rising time t  10 s power supply voltage off time t  0.5 s lvr circuit consumption i   v  = 5v +/- 10% 65 100 a current v  = 3v 45 80 
   " 6#!/;-++ #!;:<82 " '
  

&(


    )

           ' 6
9/$9 :/  %


      (= %=> (= 1'/  6"
-0        +,()%  
?
 6 11 => / 2 * % .  (   +6
5$6
' 
-#/   

        
    the s3c8238/c8235 microcontroller is currently available in 64-sdip, 64-qfp, 64-lqfp package. 
          
   

       
                     
 

 

         
                      
   

                !      
  

 

       

  "#$ "#$    "#$  
             
  


 

        

 
     
   the s3f8235 single-chip cmos microcontroller is the flash mcu  version of the s3c8235 microcontroller. it has an on-chip flash mcu rom instead of a masked rom. the flash rom is accessed by serial data format. the s3f8235 is fully compatible with the s3c8235, both in function and in pin configuration. because of its simple programming requirements, the s3f8235 is ideal as an evaluation chip for the s3c8235.      
 
  
   
  

   

 
  
  
 
               reset
  
  
 
    

 
  
  
   
 
  
 
  
 
  

  
  ! !
   
   
   
   
   
   
     !             
  
 
  
 
  
 
  
        !          !          !             !         !          !    

   
  

 
 
   
  

   

 
  
  
               reset
  
  
 
         !         !   
                                         
 
 
 
 
 
 
                 !          !      
   
   
   
   
   
     !          
   


           !                                        !          !      
   
   
     !         
   
  

   

 
  
  
               reset  
                          
               
 
 
 
 
 
 
 
  

 
  !"#
$%%&'(%)(*+,-)./ /0,$ % 1 1 1%  *. % p0.3 sdat 14 i/o serial data pin. output port when reading and input port when writing. can be assigned as a input/push-pull output port. p0.4 sclk 15 i/o serial clock pin. input only pin. v  test 20 i power supply pin for flashrom cell writing (indicates that flash mcu enters into the writing mode). when 12.5 v is applied, flash mcu is in writing mode and when 5 v is applied, flash mcu is in reading mode. (option) reset reset 23 i chip initialization v  /v  v  /v  16/17 ? logic power supply pin. v  should be tied to +5 v during programming. !"#
 0%$%%&  ( 0  0,   0  program memory 16k-byte flash rom 16k-byte mask rom operating voltage (v  ) 2.0 v to 5.5 v 2.0 v to 5.5 v flash mcu programming mode v  = 5 v, v   (test) = 12.5 v programmability user program multi time programmed at the factory 

   .-)!12/.-03)0!-) !0  when 12.5 v is supplied to the v  (test) pin of the s3f8235, the flashrom programming mode is entered. the operating mode (read, write, or read protection) is selected according to the input signals to the pins listed in table 21-3 below. !"#
.$/%( #%0 4  4  !- ! )-2*   ((  56 )*+ /%( 5 v 5 v 0 0000h 1 flash rom read 12.5 v 0 0000h 0 flash rom program 12.5 v 0 0000h 1 flash rom verify 12.5 v 1 0e3fh 0 flash rom read protection    
       !"#
  0-##0, (t   = -40 c to +85  c, v  = 2.0 v to 5.5 v)  7"%# 0%(% / !7$ /8 ' operating voltage v  f  = 8 mhz 2.7 ? 5.5 v f   = 4 mhz 2.0 ? 5.5 input high voltage v 
all input pins except v  0.8 v  ? v  v  x   xt  v  -0.1 ? input low voltage v 
all input pins except v  ? ? 0.2 v  v  x   xt  0.1    
   
 
  !"#
  0 -##0,0%( (t   = -40  c to +85  c, v  = 2.0 v to 5.5 v)  7"%# 0%(% / !7$ /8 ' output high voltage v 
v   = 2.4 v; i  = -4 ma port 0.4 only v  - 0.7 v  - 0.3 ? v v  v   = 5 v; i  = -4 ma port 3 v  - 1.0 ? ? v   v   = 5 v; i  = -1 ma all output pins except p0.4,p3 v  - 1.0 ? ? output low voltage v 
v  = 2.4 v; i  = 12 ma p0.4 only 0.3 0.5 v  v  = 5 v; i  = 15 ma p3 0.4 2.0 v   v  = 5 v; i  = 4 ma all output pins except p0.4,p3 ? 0.4 2.0 input high leakage current i 
v  = v  all input pins except i  ? ? 3 a i  v  = v  x   xt  20 input low leakage current i 
v   = 0 v all input pins except i   ? ? -3 i  v   = 0 v, x   xt  -20 output high leakage current i  v   = v  all i/o pins and output pins ? ? 3 output low leakage current i  v   = 0 v all i/o pins and output pins ? ? -3 oscillator feed back resistors r 
v   = 5.0 v t   = 25 c x   = v  , x   = 0 v 800 1000 1200 k ? pull-up resistor r
v   = 0 v; v   = 5 v 10 % port 0,1,2,4 t  = 25 c 25 50 100 r v   = 0 v; v !! = 5 v 10% t  =25 c,  only 110 210 310 com output voltage deviation v  v  = v  = 4 v (v  -comi) io = 15 p- a (i = 0-3) ? 60 200 mv seg output voltage deviation v  v  = v  = 4 v (v  -segi) io = 15 p- a (i = 0-23) ? 60 200 

   !"#
  0 -##0,0%#(( (t  = -40 c to + 85 c, v  = 2.0 v to 5.5 v)  7"%# 0%(% / !7$ /8 ' supply current  
 i 
  v   = 5 v " 10 % 8 mhz crystal oscillator ? 12 25 ma 4 mhz crystal oscillator 4 10 v   = 3 v " 10 % 8 mhz crystal oscillator 3 8 4 mhz crystal oscillator 1 5 i  idle mode: v  = 5 v " 10 % 8 mhz crystal oscillator 3 10 4 mhz crystal oscillator 1.5 4 idle mode: v  = 3 v " 10 % 8 mhz crystal oscillator 1.2 3 4 mhz crystal oscillator 1.0 2.0 i  sub operating: main-osc stop v   = 3 v " 10 % 32768 hz crystal oscillator 40 80 a i  sub idle mode: main osc stop v   = 3 v " 10 % 32768 hz crystal oscillator 7 14 i  main stop mode : sub-osc stop v   = 5 v " 10 % 1 3 v   = 3 v " 10 % 0.5 2    #$ %$

 $$ 
$ $ &$

' 
$$$
   
   $

$

($)%
 
     $ %
*
 

$)%
*$ %

 $ +!,
)

   
$  -   $ $)%
*
 

 .,
)
/

,
.., 0 (%
$$ ,1
$ $ %$(
2) 3&
 
  !"#
  4) %94%#)00,  7"%# !0%(% / !7$ /8 ' lvr voltage high v  2.4 2.8 4.0 v lvr voltage low v  2.0 2.4 3.2 2.2 2.6 3.6 2.4 2.8 4.0 v power supply voltage riseing time t  10 s power supply voltage off time t  0.5 s lvr circuit consumption i  v  = 5v +/- 10% 65 100 a current v  = 3v 45 80     
 4('560..('6789  +$
$ 
,
$
 %   "  " 
"  "  
  4) %94%#)!

     #$% $ #$%  &''()#*("+,-#./ 0102&2#013"4&5"0*1#5(*56#7# #8#*350((+"*4#94-:&-15)   !#$        9  +36#")'- ;(+3<#")'- 
 .$4%#)

       

 samsung provides a powerful and easy-to-use development support system in turnkey form. the development support system is configured with a host system, debugging tools, and support software. for the host system, any standard computer that operates with ms-dos as its operating system can be used. one type of debugging tool including hardware and software is provided: the sophisticated and powerful in-circuit emulator, smds2+, for s3c7, s3c9, s3c8 families of microcontrollers. the smds2+ is a new and improved version of smds2. samsung also offers support software that includes debugger, assembler, and a program for setting options.  samsung host interface for in-circuit emulator, shine, is a multi-window based debugger for smds2+. shine provides pull-down and pop-up menus, mouse support, function/hot keys, and context-sensitive hyper-linked help. it has an advanced, multiple-windowed user interface that emphasizes ease of use. each window can be sized, moved, scrolled, highlighted, added, or removed completely. 
  the samsung arrangeable microcontroller (sam) assembler, sama, is a universal assembler, and generates object code in standard hexadecimal format. assembled program code includes the object code that is used for rom data and required smds program control data. to assemble programs, sama requires a source file and an auxiliary definition (def) file with device specific information.   the sasm88 is a relocatable assembler for samsung's s3c8-series microcontrollers. the sasm88 takes a source file containing assembly language statements and translates into a corresponding source code, object code and comments. the sasm88 supports macros and conditional assembly. it runs on the ms-dos operating system. it produces the relocatable object code only, so the user should link object file. object files can be linked with other object files and loaded into memory.    hex2rom file generates rom code from hex file which has been produced by assembler. rom code must be needed to fabricate a microcontroller which has a mask rom. when generating the rom code (.obj file) by hex2rom, the value "ff" is filled into the unused rom area up to the maximum rom size of the target device automatically.     target boards are available for all s3c8-series microcontrollers. all required target system cables and adapters are included with the device-specific target board.

      
   

 
   
 
   

 !  
" #$ ! 
% 
 ! #  !  &
'$ ! 
  % ! $#  () *  !"#$ "%&'

      ( )*    the TB8238/5 target board is used for the s3c8238/c8325/f8235 microcontroller. it is supported with the smds2+, smart kit and openice.  ++,   
   + (( -+. /  +0.12 (. (3*    
  
   + -+.+    0 0/ +  ,/4++   #
53  66 ! 73 73 /.. /..  ( )*$  $!"#$ "

      $+,-, " ".# ( )* /0.12/  ". 3$ " !44" .   #
53  66 ! 
  $#    7  3  3  3  the smds2/smds2+ supplies v  to the target board (evaluation chip) and the target system.   #
53  66 ! 
  $#   7 (8
! 3  3  3   the smds2/smds2+ supplies v  only to the target board (evaluation chip). the target system must have its own power supply.    
 
 


    
  
  $+,-, " ".#2!3$ "%."&",5' /0.12/ ". 3$ " !44" . (34 3 3 
  $#   7  3 3  3 the smds2+ supplies 5v to TB8238/5 target board (s3e8230). so, the target system be operated by 5v. (34 3 3 
  $#   7  3 3  3 the smds2+ supplies 3v to TB8238/5 target board (s3e8230). so, the target system be operated by 3v.    
 !" #$ %&'()*+,- 
.

     &
!% ' in order to write data into program memory that is available in smds2+, the target board should be selected to be for smds2+ through a switch as follows. otherwise, the program memory writing function is not available. $+,(6&,, " " /7/ " 3$ "    7    7 
  $#  

 the yellow led is on when the evaluation chip (s3e8230) is in idle mode. 
 the red led is on when the evaluation chip (s3e8230) is in stop mode.

       
          
  
 
      
 
 
 




   
     

reset 
      
 
 

 



                 
   
                




              
 
  



                                 
                  (89"!"" .%:9;:9'# ( )* 
  
 

  
 $#  

  -+.  / 0 0/ -+.+ + +  
9 :;0/ < 

 #:0 -+.  / 0 0/ -+.+ + +  8(! ( )! (*) (*+$3 !$+,.#<8=$>$ 


▲Up To Search▲   

 
Price & Availability of TB8238

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X